-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
coincatch
Kind: global class
Extends: Exchange
- fetchTime
- fetchCurrencies
- fetchDepositWithdrawFees
- fetchMarkets
- fetchTicker
- fetchTickers
- fetchOrderBook
- fetchOHLCV
- fetchTrades
- fetchFundingRate
- fetchFundingRateHistory
- fetchBalance
- transfer
- fetchDepositAddress
- fetchDeposits
- fetchWithdrawals
- withdraw
- createMarketBuyOrderWithCost
- createOrder
- createSpotOrder
- createSwapOrder
- createOrderWithTakeProfitAndStopLoss
- createOrders
- editOrder
- fetchOrder
- fetchOpenOrders
- fetchCanceledAndClosedOrders
- cancelOrder
- cancelAllOrders
- cancelOrders
- fetchMyTrades
- fetchOrderTrades
- fetchMarginMode
- setMarginMode
- fetchPositionMode
- setPositionMode
- fetchLeverage
- setLeverage
- reduceMargin
- addMargin
- fetchPosition
- fetchPositionsForSymbol
- fetchPositions
- fetchLedger
- watchTicker
- unWatchTicker
- watchTickers
- watchOHLCV
- unWatchOHLCV
- watchOrderBook
- unWatchOrderBook
- watchOrderBookForSymbols
- watchTrades
- watchTradesForSymbols
- unWatchTrades
- watchBalance
- watchOrders
- watchPositions
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of coincatch
Returns: int - the current integer timestamp in milliseconds from the exchange server
See: https://coincatch.github.io/github.io/en/spot/#get-server-time
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchTime ([params])fetches all available currencies on an exchange
Kind: instance method of coincatch
Returns: object - an associative dictionary of currencies
See: https://coincatch.github.io/github.io/en/spot/#get-coin-list
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchCurrencies ([params])fetch deposit and withdraw fees
Kind: instance method of coincatch
Returns: object - a list of fee structures
See: https://coincatch.github.io/github.io/en/spot/#get-coin-list
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string> |
No | list of unified currency codes |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchDepositWithdrawFees ([codes, params])retrieves data on all markets for the exchange
Kind: instance method of coincatch
Returns: Array<object> - an array of objects representing market data
See
- https://coincatch.github.io/github.io/en/spot/#get-all-tickers
- https://coincatch.github.io/github.io/en/mix/#get-all-symbols
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchMarkets ([params])fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of coincatch
Returns: object - a ticker structure
See
- https://coincatch.github.io/github.io/en/spot/#get-single-ticker
- https://coincatch.github.io/github.io/en/mix/#get-single-symbol-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchTicker (symbol[, params])fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of coincatch
Returns: object - a dictionary of ticker structures
See
- https://coincatch.github.io/github.io/en/spot/#get-all-tickers
- https://coincatch.github.io/github.io/en/mix/#get-all-symbol-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | 'spot' or 'swap' (default 'spot') |
| params.productType | string |
No | 'umcbl' or 'dmcbl' (default 'umcbl') - USDT perpetual contract or Universal margin perpetual contract |
coincatch.fetchTickers ([symbols, params])fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of coincatch
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://coincatch.github.io/github.io/en/spot/#get-merged-depth-data
- https://coincatch.github.io/github.io/en/mix/#get-merged-depth-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return (maximum and default value is 100) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.precision | string |
No | 'scale0' (default), 'scale1', 'scale2' or 'scale3' - price accuracy, according to the selected accuracy as the step size to return the cumulative depth |
coincatch.fetchOrderBook (symbol[, limit, params])fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of coincatch
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://coincatch.github.io/github.io/en/spot/#get-candle-data
- https://coincatch.github.io/github.io/en/mix/#get-candle-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch (default 100) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms of the latest candle to fetch |
| params.price | string |
No | "mark" for mark price candles |
coincatch.fetchOHLCV (symbol, timeframe[, since, limit, params])get the list of most recent trades for a particular symbol
Kind: instance method of coincatch
Returns: Array<Trade> - a list of trade structures
See
- https://coincatch.github.io/github.io/en/spot/#get-recent-trades
- https://coincatch.github.io/github.io/en/mix/#get-fills
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms of the latest entry to fetch |
coincatch.fetchTrades (symbol[, since, limit, params])fetch the current funding rate
Kind: instance method of coincatch
Returns: object - a funding rate structure
See: https://coincatch.github.io/github.io/en/mix/#get-current-funding-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchFundingRate (symbol[, params])fetches historical funding rate prices
Kind: instance method of coincatch
Returns: Array<object> - a list of funding rate structures
See: https://coincatch.github.io/github.io/en/mix/#get-history-funding-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the funding rate history for |
| since | int |
No | timestamp in ms of the earliest funding rate to fetch |
| limit | int |
No | the maximum amount of entries to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.pageNo | int |
No | the page number to fetch |
| params.nextPage | bool |
No | whether to query the next page (default false) |
coincatch.fetchFundingRateHistory (symbol[, since, limit, params])query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of coincatch
Returns: object - a balance structure
See: https://coincatch.github.io/github.io/en/spot/#get-account-assets
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot') |
| params.productType | string |
No | swap only 'umcbl' or 'dmcbl' (default 'umcbl') |
coincatch.fetchBalance ([params])transfer currency internally between wallets on the same account
Kind: instance method of coincatch
Returns: object - a transfer structure
See: https://coincatch.github.io/github.io/en/spot/#transfer
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | amount to transfer |
| fromAccount | string |
Yes | 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer from |
| toAccount | string |
Yes | 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer to |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string |
No | a unique id for the transfer |
coincatch.transfer (code, amount, fromAccount, toAccount[, params])fetch the deposit address for a currency associated with this account
Kind: instance method of coincatch
Returns: object - an address structure
See: https://coincatch.github.io/github.io/en/spot/#get-coin-address
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.network | string |
No | network for fetch deposit address |
coincatch.fetchDepositAddress (code[, params])fetch all deposits made to an account
Kind: instance method of coincatch
Returns: Array<object> - a list of transfer structures
See: https://coincatch.github.io/github.io/en/spot/#get-deposit-list
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency transferred |
| since | int |
No | the earliest time in ms to fetch transfers for (default 24 hours ago) |
| limit | int |
No | the maximum number of transfer structures to retrieve (not used by exchange) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch transfers for (default time now) |
| params.pageNo | int |
No | pageNo default 1 |
| params.pageSize | int |
No | pageSize (default 20, max 100) |
coincatch.fetchDeposits (code[, since, limit, params])fetch all withdrawals made from an account
Kind: instance method of coincatch
Returns: Array<object> - a list of transaction structures
See: https://coincatch.github.io/github.io/en/spot/#get-withdraw-list-v2
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency transferred |
| since | int |
No | the earliest time in ms to fetch transfers for (default 24 hours ago) |
| limit | int |
No | the maximum number of transfer structures to retrieve (default 50, max 200) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch transfers for (default time now) |
| params.clientOid | string |
No | clientOid |
| params.orderId | string |
No | The response orderId |
| params.idLessThan | string |
No | Requests the content on the page before this ID (older data), the value input should be the orderId of the corresponding interface. |
coincatch.fetchWithdrawals (code[, since, limit, params])make a withdrawal
Kind: instance method of coincatch
Returns: object - a transaction structure
See: https://coincatch.github.io/github.io/en/spot/#withdraw
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | the amount to withdraw |
| address | string |
Yes | the address to withdraw to |
| tag | string |
No | |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.network | string |
Yes | network for withdraw (mandatory) |
| params.remark | string |
No | remark |
| params.clientOid | string |
No | custom id |
coincatch.withdraw (code, amount, address[, tag, params])create a market buy order by providing the symbol and cost
Kind: instance method of coincatch
Returns: object - an order structure
See: https://coincatch.github.io/github.io/en/spot/#place-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| cost | float |
Yes | how much you want to trade in units of the quote currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.createMarketBuyOrderWithCost (symbol, cost[, params])create a trade order
Kind: instance method of coincatch
Returns: object - an order structure
See
- https://coincatch.github.io/github.io/en/spot/#place-order
- https://coincatch.github.io/github.io/en/spot/#place-plan-order
- https://coincatch.github.io/github.io/en/mix/#place-order
- https://coincatch.github.io/github.io/en/mix/#place-plan-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of you want to trade in units of the base currency |
| price | float |
No | the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.hedged | bool |
No | swap markets only must be set to true if position mode is hedged (default false) |
| params.cost | float |
No | spot market buy only the quote quantity that can be used as an alternative for the amount |
| params.triggerPrice | float |
No | the price that the order is to be triggered |
| params.postOnly | bool |
No | if true, the order will only be posted to the order book and not executed immediately |
| params.timeInForce | string |
No | 'GTC', 'IOC', 'FOK' or 'PO' |
| params.clientOrderId | string |
No | a unique id for the order - is mandatory for swap |
coincatch.createOrder (symbol, type, side, amount[, price, params])create a trade order on spot market
Kind: instance method of coincatch
Returns: object - an order structure
See
- https://coincatch.github.io/github.io/en/spot/#place-order
- https://coincatch.github.io/github.io/en/spot/#place-plan-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of you want to trade in units of the base currency |
| price | float |
No | the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.cost | float |
No | market buy only the quote quantity that can be used as an alternative for the amount |
| params.triggerPrice | float |
No | the price that the order is to be triggered at |
| params.postOnly | bool |
No | if true, the order will only be posted to the order book and not executed immediately |
| params.timeInForce | string |
No | 'GTC', 'IOC', 'FOK' or 'PO' |
| params.clientOrderId | string |
No | a unique id for the order (max length 40) |
coincatch.createSpotOrder (symbol, type, side, amount[, price, params])create a trade order on swap market
Kind: instance method of coincatch
Returns: object - an order structure
See
- https://coincatch.github.io/github.io/en/mix/#place-order
- https://coincatch.github.io/github.io/en/mix/#place-plan-order
- https://coincatch.github.io/github.io/en/mix/#place-stop-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of you want to trade in units of the base currency |
| price | float |
No | the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.hedged | bool |
No | must be set to true if position mode is hedged (default false) |
| params.postOnly | bool |
No | non-trigger orders only if true, the order will only be posted to the order book and not executed immediately |
| params.reduceOnly | bool |
No | true or false whether the order is reduce only |
| params.timeInForce | string |
No | non-trigger orders only 'GTC', 'FOK', 'IOC' or 'PO' |
| params.clientOrderId | string |
No | a unique id for the order |
| params.triggerPrice | float |
No | the price that the order is to be triggered at |
| params.stopLossPrice | float |
No | The price at which a stop loss order is triggered at |
| params.takeProfitPrice | float |
No | The price at which a take profit order is triggered at |
| params.takeProfit | object |
No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float |
No | take profit trigger price |
| params.stopLoss | object |
No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float |
No | stop loss trigger price |
coincatch.createSwapOrder (symbol, type, side, amount[, price, params])swap markets only create an order with a stop loss or take profit attached (type 3)
Kind: instance method of coincatch
Returns: object - an order structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much you want to trade in units of the base currency or the number of contracts |
| price | float |
No | the price to fulfill the order, in units of the quote currency, ignored in market orders |
| takeProfit | float |
No | the take profit price, in units of the quote currency |
| stopLoss | float |
No | the stop loss price, in units of the quote currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.createOrderWithTakeProfitAndStopLoss (symbol, type, side, amount[, price, takeProfit, stopLoss, params])create a list of trade orders (all orders should be of the same symbol)
Kind: instance method of coincatch
Returns: object - an order structure
See: https://coincatch.github.io/github.io/en/spot/#batch-order
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array |
Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params (max 50 entries) |
| params | object |
No | extra parameters specific to the api endpoint |
coincatch.createOrders (orders[, params])edit a trade trigger, stop-looss or take-profit order
Kind: instance method of coincatch
Returns: object - an order structure
See: https://coincatch.github.io/github.io/en/spot/#modify-plan-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.editOrder (id, symbol, type, side, amount[, price, params])fetches information on an order made by the user (non-trigger orders only)
Kind: instance method of coincatch
Returns: object - An order structure
See
- https://coincatch.github.io/github.io/en/spot/#get-order-details
- https://coincatch.github.io/github.io/en/mix/#get-order-details
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the order id |
| symbol | string |
Yes | unified symbol of the market the order was made in (is mandatory for swap) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot') |
| params.clientOrderId | string |
No | a unique id for the order that can be used as an alternative for the id |
coincatch.fetchOrder (id, symbol[, params])fetch all unfilled currently open orders
Kind: instance method of coincatch
Returns: Array<Order> - a list of order structures
See
- https://coincatch.github.io/github.io/en/spot/#get-order-list
- https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
- https://coincatch.github.io/github.io/en/mix/#get-open-order
- https://coincatch.github.io/github.io/en/mix/#get-all-open-order
- https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | true if fetching trigger orders (default false) |
| params.type | string |
No | 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot') |
| params.productType | string |
No | swap only 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl') |
| params.marginCoin | string |
No | swap only the margin coin of the market to fetch entries for |
| params.isPlan | string |
No | swap trigger only 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders) |
coincatch.fetchOpenOrders ([symbol, since, limit, params])fetches information on multiple canceled and closed orders made by the user
Kind: instance method of coincatch
Returns: Array<Order> - a list of order structures
See
- https://coincatch.github.io/github.io/en/spot/#get-order-list
- https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
- https://coincatch.github.io/github.io/en/mix/#get-history-orders
- https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
- https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | is mandatory unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch orders for |
| params.trigger | boolean |
No | true if fetching trigger orders (default false) |
| params.isPlan | string |
No | swap only 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders) |
| params.type | string |
No | 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot') |
| params.productType | string |
No | swap only 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl') |
coincatch.fetchCanceledAndClosedOrders (symbol[, since, limit, params])cancels an open order
Kind: instance method of coincatch
Returns: object - An order structure
See
- https://coincatch.github.io/github.io/en/spot/#cancel-order-v2
- https://coincatch.github.io/github.io/en/spot/#cancel-plan-order
- https://coincatch.github.io/github.io/en/mix/#cancel-order
- https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string |
No | a unique id for the order that can be used as an alternative for the id |
| params.trigger | bool |
No | true for canceling a trigger order (default false) |
| params.stop | bool |
No | swap only an alternative for trigger param |
| params.planType | string |
No | swap trigger only the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop |
coincatch.cancelOrder (id, symbol[, params])cancels all open orders
Kind: instance method of coincatch
Returns: object - response from the exchange
See
- https://coincatch.github.io/github.io/en/spot/#cancel-all-orders
- https://coincatch.github.io/github.io/en/spot/#batch-cancel-plan-orders
- https://coincatch.github.io/github.io/en/mix/#batch-cancel-order
- https://coincatch.github.io/github.io/en/mix/#cancel-order-by-symbol
- https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl-by-symbol
- https://coincatch.github.io/github.io/en/mix/#cancel-all-trigger-order-tpsl
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified symbol of the market the orders were made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | 'spot' or 'swap' - the type of the market to cancel orders for (default 'spot') |
| params.trigger | bool |
No | true for canceling a trigger orders (default false) |
| params.productType | string |
No | swap only (if symbol is not provided 'umcbl' or 'dmcbl' - the product type of the market to cancel orders for (default 'umcbl') |
| params.marginCoin | string |
No | mandatory for swap non-trigger dmcb (if symbol is not provided) the margin coin of the market to cancel orders for |
| params.planType | string |
No | swap trigger only the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop |
coincatch.cancelAllOrders ([symbol, params])cancel multiple non-trigger orders
Kind: instance method of coincatch
Returns: object - an list of order structures
See: https://coincatch.github.io/github.io/en/spot/#cancel-order-in-batch-v2-single-instruments
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> |
Yes | order ids |
| symbol | string |
Yes | is mandatory unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.clientOrderIds | Array<string> |
No | client order ids |
coincatch.cancelOrders (ids, symbol[, params])fetch all trades made by the user
Kind: instance method of coincatch
Returns: Array<Trade> - a list of trade structures
See
- https://coincatch.github.io/github.io/en/spot/#get-transaction-details
- https://coincatch.github.io/github.io/en/mix/#get-order-fill-detail
- https://coincatch.github.io/github.io/en/mix/#get-producttype-order-fill-detail
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | is mandatory unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | swap markets only the latest time in ms to fetch trades for, only supports the last 30 days timeframe |
| params.lastEndId | string |
No | swap markets only query the data after this tradeId |
coincatch.fetchMyTrades (symbol[, since, limit, params])fetch all the trades made from a single order
Kind: instance method of coincatch
Returns: Array<object> - a list of trade structures
See: https://coincatch.github.io/github.io/en/spot/#get-transaction-details
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trades to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchOrderTrades (id, symbol[, since, limit, params])fetches the margin mode of the trading pair
Kind: instance method of coincatch
Returns: object - a margin mode structure
See: https://coincatch.github.io/github.io/en/mix/#get-single-account
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the margin mode for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchMarginMode (symbol[, params])set margin mode to 'cross' or 'isolated'
Kind: instance method of coincatch
Returns: object - response from the exchange
See: https://coincatch.github.io/github.io/en/mix/#change-margin-mode
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string |
Yes | 'cross' or 'isolated' |
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.setMarginMode (marginMode, symbol[, params])fetchs the position mode, hedged or one way
Kind: instance method of coincatch
Returns: object - an object detailing whether the market is in hedged or one-way mode
See: https://coincatch.github.io/github.io/en/mix/#get-single-account
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch entry for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchPositionMode (symbol[, params])set hedged to true or false for a market
Kind: instance method of coincatch
Returns: object - response from the exchange
See: https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool |
Yes | set to true to use dualSidePosition |
| symbol | string |
Yes | unified symbol of the market to fetch entry for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.productType | string |
No | 'umcbl' or 'dmcbl' (default 'umcbl' if symbol is not provided) |
coincatch.setPositionMode (hedged, symbol[, params])fetch the set leverage for a market
Kind: instance method of coincatch
Returns: object - a leverage structure
See: https://coincatch.github.io/github.io/en/mix/#get-single-account
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchLeverage (symbol[, params])set the level of leverage for a market
Kind: instance method of coincatch
Returns: object - response from the exchange
See: https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float |
Yes | the rate of leverage |
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.side | string |
No | for isolated margin mode with hedged position mode only 'long' or 'short' |
coincatch.setLeverage (leverage, symbol[, params])remove margin from a position
Kind: instance method of coincatch
Returns: object - a margin structure
See: https://coincatch.github.io/github.io/en/mix/#change-margin
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| amount | float |
Yes | the amount of margin to remove |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.side | string |
No | for isolated margin mode with hedged position mode only 'long' or 'short' |
coincatch.reduceMargin (symbol, amount[, params])add margin
Kind: instance method of coincatch
Returns: object - a margin structure
See: https://coincatch.github.io/github.io/en/mix/#change-margin
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| amount | float |
Yes | amount of margin to add |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.side | string |
No | for isolated margin mode with hedged position mode only 'long' or 'short' |
coincatch.addMargin (symbol, amount[, params])fetch data on a single open contract trade position
Kind: instance method of coincatch
Returns: object - a position structure
See: https://coincatch.github.io/github.io/en/mix/#get-symbol-position
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market the position is held in, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.side | string |
No | 'long' or 'short' for non-hedged position mode only (default 'long') |
coincatch.fetchPosition (symbol[, params])fetch all open positions for specific symbol
Kind: instance method of coincatch
Returns: Array<object> - a list of position structure
See: https://coincatch.github.io/github.io/en/mix/#get-symbol-position
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.fetchPositionsForSymbol (symbol[, params])fetch all open positions
Kind: instance method of coincatch
Returns: Array<object> - a list of position structure
See: https://coincatch.github.io/github.io/en/mix/#get-all-position
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols (all symbols must belong to the same product type) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.productType | string |
No | 'umcbl' or 'dmcbl' (default 'umcbl' if symbols are not provided) |
| params.marginCoin | string |
No | the settle currency of the positions, needs to match the productType |
coincatch.fetchPositions ([symbols, params])fetch the history of changes, actions done by the user or operations that altered balance of the user
Kind: instance method of coincatch
Returns: object - a ledger structure
See
- https://coincatch.github.io/github.io/en/spot/#get-bills
- https://coincatch.github.io/github.io/en/mix/#get-business-account-bill
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | unified currency code |
| since | int |
No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int |
No | max number of ledger entrys to return, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | swap only the latest time in ms to fetch entries for |
| params.type | string |
No | 'spot' or 'swap' (default 'spot') |
| params.after | string |
No | spot only billId, return the data less than this billId |
| params.before | string |
No | spot only billId, return the data greater than or equals to this billId |
| params.groupType | string |
No | spot only |
| params.bizType | string |
No | spot only |
| params.productType | string |
No | swap only 'umcbl' or 'dmcbl' (default 'umcbl' or 'dmcbl' if code is provided and code is not equal to 'USDT') |
| params.business | string |
No | swap only |
| params.lastEndId | string |
No | swap only |
| params.next | bool |
No | swap only |
coincatch.fetchLedger ([code, since, limit, params])watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of coincatch
Returns: object - a ticker structure
See: https://coincatch.github.io/github.io/en/spot/#tickers-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.instType | string |
No | the type of the instrument to fetch the ticker for, 'SP' for spot markets, 'MC' for futures markets (default is 'SP') |
coincatch.watchTicker (symbol[, params])unsubscribe from the ticker channel
Kind: instance method of coincatch
Returns: any - status of the unwatch request
See: https://coincatch.github.io/github.io/en/mix/#tickers-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to unwatch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.unWatchTicker (symbol[, params])watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of coincatch
Returns: object - a ticker structure
See: https://coincatch.github.io/github.io/en/mix/#tickers-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to watch the tickers for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.watchTickers (symbols[, params])watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of coincatch
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://coincatch.github.io/github.io/en/spot/#candlesticks-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch (not including) |
| limit | int |
No | the maximum amount of candles to fetch (not including) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.instType | bool |
No | the type of the instrument to fetch the OHLCV data for, 'SP' for spot markets, 'MC' for futures markets (default is 'SP') |
coincatch.watchOHLCV (symbol, timeframe[, since, limit, params])unsubscribe from the ohlcv channel
Kind: instance method of coincatch
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to unwatch the ohlcv for |
| timeframe | Yes | ||
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.unWatchOHLCV (symbol, timeframe[, params])watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of coincatch
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://coincatch.github.io/github.io/en/spot/#depth-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.watchOrderBook (symbol[, limit, params])unsubscribe from the orderbook channel
Kind: instance method of coincatch
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://coincatch.github.io/github.io/en/spot/#depth-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.limit | int |
No | orderbook limit, default is undefined |
coincatch.unWatchOrderBook (symbol[, params])watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of coincatch
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://coincatch.github.io/github.io/en/spot/#depth-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Yes | ||
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.watchOrderBookForSymbols (symbols[, limit, params])get the list of most recent trades for a particular symbol
Kind: instance method of coincatch
Returns: Array<object> - a list of trade structures
See: https://coincatch.github.io/github.io/en/spot/#trades-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.watchTrades (symbol[, since, limit, params])watches information on multiple trades made in a market
Kind: instance method of coincatch
Returns: Array<object> - a list of trade structures
See: https://coincatch.github.io/github.io/en/spot/#trades-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Yes | ||
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of trade structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.watchTradesForSymbols (symbols[, since, limit, params])unsubscribe from the trades channel
Kind: instance method of coincatch
Returns: any - status of the unwatch request
See: https://coincatch.github.io/github.io/en/spot/#trades-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to unwatch the trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
coincatch.unWatchTrades (symbol[, params])watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of coincatch
Returns: object - a balance structure
See
- https://coincatch.github.io/github.io/en/spot/#account-channel
- https://coincatch.github.io/github.io/en/mix/#account-channel
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | str |
No | 'spot' or 'swap' (default is 'spot') |
| params.instType | string |
No | swap only 'umcbl' or 'dmcbl' (default is 'umcbl') |
coincatch.watchBalance ([params])watches information on multiple orders made by the user
Kind: instance method of coincatch
Returns: Array<object> - a list of order structures
See
- https://coincatch.github.io/github.io/en/spot/#order-channel
- https://coincatch.github.io/github.io/en/mix/#order-channel
- https://coincatch.github.io/github.io/en/mix/#plan-order-channel
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | 'spot' or 'swap' |
| params.instType | string |
No | swap only 'umcbl' or 'dmcbl' (default is 'umcbl') |
| params.trigger | bool |
No | swap only whether to watch trigger orders (default is false) |
coincatch.watchOrders (symbol[, since, limit, params])watch all open positions
Kind: instance method of coincatch
Returns: Array<object> - a list of position structure
See: https://coincatch.github.io/github.io/en/mix/#positions-channel
| Param | Type | Description |
|---|---|---|
| symbols |
Array<string>, undefined
|
list of unified market symbols |
| since | ||
| limit | ||
| params | object |
extra parameters specific to the exchange API endpoint |
coincatch.watchPositions (symbols, since, limit, params[])(If the page is not being rendered for you, you can refer to the mirror at https://docs.ccxt.com/)
- Install
- Examples
- Manual
- CCXT Pro
- Contributing
- Supported Exchanges
- Exchanges By Country
- API Spec By Method
- FAQ
- Changelog
- Awesome
- API Spec by Exchange
- fetchCurrencies
- alpaca
- apex
- ascendex
- aster
- backpack
- bigone
- binance
- bingx
- bit2c
- bitbank
- bitbns
- bitfinex
- bitflyer
- bitget
- bithumb
- bitmart
- bitmex
- bitopro
- bitrue
- bitso
- bitstamp
- bitteam
- bittrade
- bitvavo
- blockchaincom
- blofin
- btcbox
- btcmarkets
- btcturk
- bullish
- bybit
- bydfi
- cex
- coinbase
- coinbaseexchange
- coinbaseinternational
- coincheck
- coinex
- coinmate
- coinmetro
- coinone
- coinsph
- coinspot
- cryptocom
- cryptomus
- deepcoin
- delta
- deribit
- derive
- digifinex
- dydx
- exmo
- extended
- foxbit
- gate
- gemini
- grvt
- hashkey
- hibachi
- hitbtc
- hollaex
- htx
- hyperliquid
- independentreserve
- indodax
- kraken
- krakenfutures
- kucoin
- fetchBidsAsks
- latoken
- lbank
- lighter
- luno
- mercado
- mexc
- modetrade
- ndax
- novadax
- okx
- onetrading
- p2b
- pacifica
- paradex
- paymium
- phemex
- poloniex
- tokocrypto
- toobit
- upbit
- weex
- whitebit
- woo
- woofipro
- xt
- zaif
- fetchStatus