* Create an OCO spot order * @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oco-trade * @param {OrderSide} side - BUY or SELL * @param {string} symbol - The symbol to buy or sell * @param {string} quantity - The quantity
(side: OrderSide, symbol: string, quantity: number, params: Dict = {})
| 937 | * @return {undefined} |
| 938 | */ |
| 939 | async ocoOrder(side: OrderSide, symbol: string, quantity: number, params: Dict = {}): Promise<OCOOrder> { |
| 940 | const request = { |
| 941 | symbol: symbol, |
| 942 | side: side, |
| 943 | quantity: quantity, |
| 944 | } as Dict; |
| 945 | |
| 946 | if (!params.listClientOrderId) { |
| 947 | const id = this.SPOT_PREFIX + this.uuid22(); |
| 948 | request.listClientOrderId = id; |
| 949 | } |
| 950 | |
| 951 | const endpoint = 'v3/orderList/oco'; |
| 952 | const response = await this.privateSpotRequest(endpoint, this.extend(request, params), 'POST'); |
| 953 | return response; |
| 954 | } |
| 955 | |
| 956 | /** |
| 957 | * Creates a buy order |
no test coverage detected