OKX API v5 updates report Q3 2021
BRAZILIEX
相關類型: Others
2022-09-02 14:28
Dear API users: To: OKX API users From: OKX API product team Issue Date: Qct. 29, 2021 Contact us: https://t.me/OKXAPI The OKX API v5 service received numerous updates in Q3 2021 as part of our efforts to continually improve its user experience. This report summarizes those updates, and users can review detailed change logs here. Summary of updates to API v5 in Q3 2021: Trade module . Id Endpoint Change summary Date 1 Get transaction details Added interfaces 20-Jul-2021 Get transaction details 2 REST - Place order Added a new field tgtCcy 30-Jul-2021 REST - Place multiple orders REST - Get order details REST - Get order history REST - Get order history REST - Get order list REST - Place algo order REST - Get algo order list REST - Get algo order history WebSocket - Place order WebSocket - Place multiple orders Funding module . Id Endpoint Change summary Date 1 Get PiggyBank balance Added interface 08-Jul-2021 2 Get transaction details Added interface 20-Jul-2021 3 Get withdrawal history Added a new request field txId 20-Aug-2021 Get deposit history Withdrawal Supported universal address 4 Lightning withdrawals Added interfaces 30-Sep-2021 Lightning deposits Account module . Id Endpoint Change summary Date 1 Get balance Added new response fields stgyEq and isoUpl 31-Aug-2021 2 Get leverage Support multiple instrument IDs , separated with commas. 07-Sep-2021 Market data module . Id Endpoint Change summary Date 1 Get index components Added interface 07-Sep-2021 Trading data module . Id Endpoint Change summary Date 1 Get support coin Added a new function module 03-Sep-2021 2 Get taker volume 3 Get margin lending ratio 4 Get long/short ratio 5 Get contracts open interest and volume 6 Get options open interest and volume 7 Get put/call ratio 8 Get open interest and volume 9 Get open interest and volume 10 Get taker flow WebSocket module . Id Endpoint Change summary Date 1 Order channel Added a new field tgtCcy 30-Jul-2021 2 Algo order channel 3 Account channel Added new fields stgyEq and isoUpl 31-Aug-2021 Error codes . Id Change summary Date 1 Add new error code 59110 with the message: "The instrument type corresponding to this {0} does not support the tgtCcy parameter." 30-Jul-2021 2 Add new error code 51281 with the message: "trigger not support the tgtCcy parameter." 3 Add new error code 51282 with the message: "The range of Price variance is {0}~{1}." 08-Sep-2021 4 Add new error code 51283 with the message: "The range of Time interval is {0}~{1}." 5 Add new error code 51284 with the message: "The range of Average amount is {0}~{1}." 6 Add new error code 51285 with the message: "The range of Total amount is {0}~{1}." 7 Add new error code 51286 with the message: "The total amount should not be less than {0}." 8 Add new error code 51287 with the message: "Contract not supported." 9 Add new error code 51288 with the message: "We are stopping the Bot. Please do not click it multiple times." 10 Add new error code 51289 with the message: "Bot configuration does not exist. Please try again later." 11 Add new error code 51290 with the message: "The Bot engine is being upgraded. Please try again later." 12 Add new error code 51291 with the message: "This Bot does not exist or has been stopped." 13 Add new error code 51292 with the message: "This Bot type does not exist." 14 Add new error code 51293 with the message: "This Bot does not exist." 15 Add new error code 51294 with the message: "This Bot cannot be created temporarily. Please try again later." 16 Add new error code 58351 with the message: "Invoice expired." 30-Sep-2021 17 Add new error code 58352 with the message: "Invalid invoice." 18 Add new error code 58353 with the message: "Deposit amount must be within limits." 19 Add new error code 58354 with the message: "You have reached the limit of 100 invoices per day." 20 Add new error code 58355 with the message: "Permission denied. Please contact your account manager." 21 Add new error code 58356 with the message: "The accounts of the same node do not support the Lightning network deposit or withdrawal." Change details: Trade module . Change 1 Date: 20-Jul-2021 . Endpoints: Get transaction details . Get transaction details REST URLs: GET /api/v5/trade/fills,GET /api/v5/trade/fills-history . Description: Add new REST endpoints. . Benefit: Users can fetch transaction details for the last 3 days and the last 3 months. . Change 2 Date: 30-Jul-2021 . REST endpoints: . Place order, Place multiple orders, Get order details, Get order history , Get order history , Get order list, Place algo order, Get algo order List, Get algo order history REST URLs: POST /api/v5/trade/order . POST /api/v5/trade/batch-orders GET /api/v5/trade/order GET /api/v5/trade/orders-history GET /api/v5/trade/orders-history-archive GET /api/v5/trade/orders-pending POST /api/v5/trade/order-algo GET /api/v5/trade/orders-algo-pending GET /api/v5/trade/orders-algo-history WebSocket operations: Place order, place multiple orders . WebSocket operation keys: order, batch-orders . Description: . Added a new field tgtCcy in response parameters for order query endpoints , which is applicable to spot trading at a market price. . Added a new field tgtCcy in request parameters for order placement endpoints, which is applicable to spot trading at a market price. . Benefit: This newly added field allows users to place spot orders with quantity or amount. . Funding module . Change 1 Date: 08-Jul-2021 . Endpoint: Get PiggyBank balance . URL: GET /api/v5/asset/piggy-balance . Description: Add this new REST endpoint. . Benefit: Users can fetch the Piggy Bank balance. . Change 2 Date: 20-Aug-2021 . Endpoints: Get deposit history, get withdrawal history, withdrawal . URLs: GET /api/v5/asset/withdrawal-history . GET /api/v5/asset/deposit-history POST /api/v5/asset/withdrawal Description: . Added a new request parameter txId for endpoints deposit-history and withdrawal-history. . Withdrawal supported universal address . . Benefit: Users can fetch the deposit-history and withdrawal-history through the hash record of the deposit and can withdraw with a universal address. . Change 3 Date: 30-Sep-2021 . Endpoints: Lightning withdrawals, Lightning deposits . URLs: POST /api/v5/asset/withdrawal-lightning . GET /api/v5/asset/deposit-lightning Description: Add new REST endpoints. . Benefit: Users can withdrawal and deposit through the Lighting Network. . Account module . Change 1 Date: 31-Aug-2021 . Endpoint: Get Balance . URL: GET /api/v5/account/balance . Description: Added new response parameters stgyEq and isoUpl. . Benefit: Users can fetch strategy equity and isolated unrealized profit and loss of the currency. . Change 2 Date: 07-Sep-2021 . Endpoint: Get leverage . URL: GET /api/v5/account/leverage-info . Description: Allows users to specify multiple instrument IDs , separated with commas. . Benefit: This makes the query more flexible. . Market data module . Change 1 Date: 07-Sep-2021 . Endpoint: Get index components . URL: GET /api/v5/market/index-components . Description: Add this new REST endpoint. . Benefit: Users can fetch index components. . Trading data module . Change 1 Date: 03-Sep-2021 . Endpoints: Get support coin, get taker volume, get margin lending ratio, get long/short ratio, get contracts open interest and volume, get options open interest and volume, get put/call ratio, get open interest and volume , get open interest and volume , get taker flow . URLs: GET /api/v5/rubik/stat/trading-data/support-coin . GET /api/v5/rubik/stat/taker-volume GET /api/v5/rubik/stat/margin/loan-ratio GET /api/v5/rubik/stat/contracts/long-short-account-ratio GET /api/v5/rubik/stat/contracts/open-interest-volume GET /api/v5/rubik/stat/option/open-interest-volume GET /api/v5/rubik/stat/option/open-interest-volume-ratio GET /api/v5/rubik/stat/option/open-interest-volume-expiry GET /api/v5/rubik/stat/option/open-interest-volume-strike GET /api/v5/rubik/stat/option/taker-block-volume Description: Added a trading data module. . Benefit: Users can fetch trading data. . WebSocket module . Change 1 Date: 30-Jul-2021 . Channel: Orders channel, Algo orders channel . Subscription name: orders, orders-algo . Description: Added a new field tgtCcy to push data for market order and stop order, which is applicable to spot trading at a market price. . Benefit: This newly added field allows users to place a spot order with quantity or amount. . Change 2 Date: 31-Aug-2021 . Channel: Account channel . Subscription name: account . Description: Added new fields stgyEq and isoUpl to push data . . Benefit: Users can fetch strategy equity and isolated unrealized profit and loss of the currency. . Error codes . Change 1 Date: 30-Jul-2021 . Description: . Add new error code 59110 with the message: "The instrument type corresponding to this {0} does not support the tgtCcy parameter." . Add new error code 51281 with the message: "trigger not support the tgtCcy parameter." . Benefit: The error situation is made more clear to users. . Change 2 Date: 08-Sep-2021 . Description: . Add new error code 51282 with the message: "The range of Price variance is {0}~{1}" . Add new error code 51283 with the message: "The range of Time interval is {0}~{1}" . Add new error code 51284 with the message: "The range of Average amount is {0}~{1}" . Add new error code 51285 with the message: "The range of Total amount is {0}~{1}" . Add new error code 51286 with the message: "The total amount should not be less than {0}" . Add new error code 51287 with the message: "Contract not supported" . Add new error code 51288 with the message: "We are stopping the Bot. Please do not click it multiple times" . Add new error code 51289 with the message: "Bot configuration does not exist. Please try again later" . Add new error code 51290 with the message: "The Bot engine is being upgraded. Please try again later" . Add new error code 51291 with the message: "This Bot does not exist or has been stopped" . Add new error code 51292 with the message: "This Bot type does not exist" . Add new error code 51293 with the message: "This Bot does not exist" . Add new error code 51294 with the message: "This Bot cannot be created 1temporarily. Please try again later" . Benefit: Users are given more clarity about errors. . Change 3 Date: 30-Sep-2021 . Description: . Add new error code 58351 with the message: "Invoice expired." . Add new error code 58352 with the message: "Invalid invoice." . Add new error code 58353 with the message: "Deposit amount must be within limits." . Add new error code 58354 with the message: "You have reached the limit of 100 invoices per day." . Add new error code 58355 with the message: "Permission denied. Please contact your account manager." . Add new error code 58356 with the message: "The accounts of the same node do not support the Lightning Network deposit or withdrawal." . Benefit: Gives users more clarity about errors. . . . . OKX, April 14, 2022. . Click Here to Download OKX App >>>. Click Here for OKX Twitter >>>. Click Here to Join OKX Official Community >>>.