Back to Ccxt

Coinex

wiki/exchanges/coinex.md

4.5.5260.2 KB
Original Source

<a name="coinex" id="coinex"></a>

coinex{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an associative dictionary of currencies

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchCurrencies ([params])

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

retrieves data on all markets for coinex

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - an array of objects representing market data

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchMarkets ([params])

<a name="fetchTicker" id="fetchticker"></a>

fetchTicker{docsify-ignore}

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchTicker (symbol[, params])

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers{docsify-ignore}

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchTickers (symbols[, params])

<a name="fetchTime" id="fetchtime"></a>

fetchTime{docsify-ignore}

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance method of <code>coinex</code>
Returns: <code>int</code> - the current integer timestamp in milliseconds from the exchange server

See: https://docs.coinex.com/api/v2/common/http/time

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchTime ([params])

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchOrderBook (symbol[, limit, params])

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

get the list of the most recent trades for a particular symbol

Kind: instance method of <code>coinex</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchTrades (symbol[, since, limit, params])

<a name="fetchTradingFee" id="fetchtradingfee"></a>

fetchTradingFee{docsify-ignore}

fetch the trading fees for a market

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a fee structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchTradingFee (symbol[, params])

<a name="fetchTradingFees" id="fetchtradingfees"></a>

fetchTradingFees{docsify-ignore}

fetch the trading fees for multiple markets

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a dictionary of fee structures indexed by market symbols

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchTradingFees ([params])

<a name="fetchOHLCV" id="fetchohlcv"></a>

fetchOHLCV{docsify-ignore}

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of <code>coinex</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchOHLCV (symbol, timeframe[, since, limit, params])

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

query for balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a balance structure

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>No'margin', 'swap', 'financial', or 'spot'
javascript
coinex.fetchBalance ([params])

<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>

createMarketBuyOrderWithCost{docsify-ignore}

create a market buy order by providing the symbol and cost

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.createMarketBuyOrderWithCost (symbol, cost[, params])

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

create a trade order

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much you want to trade in units of the base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>float</code>Noprice to trigger stop orders
params.stopLossPrice<code>float</code>Noprice to trigger stop loss orders
params.takeProfitPrice<code>float</code>Noprice to trigger take profit orders
params.timeInForce<code>string</code>No'GTC', 'IOC', 'FOK', 'PO'
params.postOnly<code>boolean</code>Noset to true if you wish to make a post only order
params.reduceOnly<code>boolean</code>Nocontract only indicates if this order is to reduce the size of a position
javascript
coinex.createOrder (symbol, type, side, amount[, price, params])

<a name="createOrders" id="createorders"></a>

createOrders{docsify-ignore}

create a list of trade orders (all orders should be of the same symbol)

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the api endpoint
javascript
coinex.createOrders (orders[, params])

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders{docsify-ignore}

cancel multiple orders

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a list of order structures

See

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Noset to true for canceling stop orders
javascript
coinex.cancelOrders (ids, symbol[, params])

<a name="editOrder" id="editorder"></a>

editOrder{docsify-ignore}

edit a trade order

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of the currency you want to trade in units of the base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>float</code>Nothe price to trigger stop orders
javascript
coinex.editOrder (id, symbol, type, side, amount[, price, params])

<a name="editOrders" id="editorders"></a>

editOrders{docsify-ignore}

edit a list of trade orders

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to edit, each object should contain the parameters required by editOrder, namely id, symbol, amount, price and params
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.editOrders (orders[, params])

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

cancels an open order

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>Noclient order id, defaults to id if not passed
params.trigger<code>boolean</code>Noset to true for canceling a trigger order
javascript
coinex.cancelOrder (id, symbol[, params])

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders{docsify-ignore}

cancel all open orders in a market

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market to cancel orders in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'cross' or 'isolated' for canceling spot margin orders
javascript
coinex.cancelAllOrders (symbol[, params])

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder{docsify-ignore}

fetches information on an order made by the user

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchOrder (id, symbol[, params])

<a name="fetchOrdersByStatus" id="fetchordersbystatus"></a>

fetchOrdersByStatus{docsify-ignore}

fetch a list of orders

Kind: instance method of <code>coinex</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
status<code>string</code>Yesorder status to fetch for
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.marginMode<code>string</code>No'cross' or 'isolated' for fetching spot margin orders
javascript
coinex.fetchOrdersByStatus (status, symbol[, since, limit, params])

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

Kind: instance method of <code>coinex</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.marginMode<code>string</code>No'cross' or 'isolated' for fetching spot margin orders
javascript
coinex.fetchOpenOrders (symbol[, since, limit, params])

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders{docsify-ignore}

fetches information on multiple closed orders made by the user

Kind: instance method of <code>coinex</code>
Returns: <code>Array<Order></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.marginMode<code>string</code>No'cross' or 'isolated' for fetching spot margin orders
javascript
coinex.fetchClosedOrders (symbol[, since, limit, params])

<a name="createDepositAddress" id="createdepositaddress"></a>

createDepositAddress{docsify-ignore}

create a currency deposit address

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an address structure

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/update-deposit-address

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency for the deposit address
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Nothe blockchain network to create a deposit address on
javascript
coinex.createDepositAddress (code[, params])

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress{docsify-ignore}

fetch the deposit address for a currency associated with this account

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an address structure

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-address

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Nothe blockchain network to create a deposit address on
javascript
coinex.fetchDepositAddress (code[, params])

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

Kind: instance method of <code>coinex</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest trades
params.side<code>string</code>Nothe side of the trades, either 'buy' or 'sell', required for swap
javascript
coinex.fetchMyTrades (symbol[, since, limit, params])

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

fetch all open positions

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of position structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.method<code>string</code>Nothe method to use 'v2PrivateGetFuturesPendingPosition' or 'v2PrivateGetFuturesFinishedPosition' default is 'v2PrivateGetFuturesPendingPosition'
javascript
coinex.fetchPositions ([symbols, params])

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition{docsify-ignore}

fetch data on a single open contract trade position

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a position structure

See: https://docs.coinex.com/api/v2/futures/position/http/list-pending-position

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchPosition (symbol[, params])

<a name="setMarginMode" id="setmarginmode"></a>

setMarginMode{docsify-ignore}

set margin mode to 'cross' or 'isolated'

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - response from the exchange

See: https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage

ParamTypeRequiredDescription
marginMode<code>string</code>Yes'cross' or 'isolated'
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.leverage<code>int</code>Yesthe rate of leverage
javascript
coinex.setMarginMode (marginMode, symbol[, params])

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

set the level of leverage for a market

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - response from the exchange

See: https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'cross' or 'isolated' (default is 'cross')
javascript
coinex.setLeverage (leverage, symbol[, params])

<a name="fetchLeverageTiers" id="fetchleveragetiers"></a>

fetchLeverageTiers{docsify-ignore}

retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a dictionary of leverage tiers structures, indexed by market symbols

See: https://docs.coinex.com/api/v2/futures/market/http/list-market-position-level

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchLeverageTiers (symbols[, params])

<a name="addMargin" id="addmargin"></a>

addMargin{docsify-ignore}

add margin

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a margin structure

See: https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesamount of margin to add
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.addMargin (symbol, amount[, params])

<a name="reduceMargin" id="reducemargin"></a>

reduceMargin{docsify-ignore}

remove margin from a position

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a margin structure

See: https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesthe amount of margin to remove
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.reduceMargin (symbol, amount[, params])

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory{docsify-ignore}

fetch the history of funding fee payments paid and received on this account

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a funding history structure

See: https://docs.coinex.com/api/v2/futures/position/http/list-position-funding-history

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch funding history for
limit<code>int</code>Nothe maximum number of funding history structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchFundingHistory (symbol[, since, limit, params])

<a name="fetchFundingRate" id="fetchfundingrate"></a>

fetchFundingRate{docsify-ignore}

fetch the current funding rate

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a funding rate structure

See: https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchFundingRate (symbol[, params])

<a name="fetchFundingInterval" id="fetchfundinginterval"></a>

fetchFundingInterval{docsify-ignore}

fetch the current funding rate interval

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a funding rate structure

See: https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchFundingInterval (symbol[, params])

<a name="fetchFundingRates" id="fetchfundingrates"></a>

fetchFundingRates{docsify-ignore}

fetch the current funding rates for multiple markets

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - an array of funding rate structures

See: https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchFundingRates (symbols[, params])

<a name="withdraw" id="withdraw"></a>

withdraw{docsify-ignore}

make a withdrawal

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a transaction structure

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/withdrawal

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Nomemo
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Nounified network code
javascript
coinex.withdraw (code, amount, address[, tag, params])

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory{docsify-ignore}

fetches historical funding rate prices

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of funding rate structures

See: https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate-history

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.until<code>int</code>Notimestamp in ms of the latest funding rate
javascript
coinex.fetchFundingRateHistory (symbol[, since, limit, params])

<a name="transfer" id="transfer"></a>

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a transfer structure

See: https://docs.coinex.com/api/v2/assets/transfer/http/transfer

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.symbol<code>string</code>Nounified ccxt symbol, required when either the fromAccount or toAccount is margin
javascript
coinex.transfer (code, amount, fromAccount, toAccount[, params])

<a name="fetchTransfers" id="fetchtransfers"></a>

fetchTransfers{docsify-ignore}

fetch a history of internal transfers made on an account

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of transfer structures

See: https://docs.coinex.com/api/v2/assets/transfer/http/list-transfer-history

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency transferred
since<code>int</code>Nothe earliest time in ms to fetch transfers for
limit<code>int</code>Nothe maximum number of transfer structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'cross' or 'isolated' for fetching transfers to and from your margin account
javascript
coinex.fetchTransfers (code[, since, limit, params])

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-withdrawal-history

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawal structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchWithdrawals ([code, since, limit, params])

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of transaction structures

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-deposit-history

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposit structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchDeposits ([code, since, limit, params])

<a name="fetchIsolatedBorrowRate" id="fetchisolatedborrowrate"></a>

fetchIsolatedBorrowRate{docsify-ignore}

fetch the rate of interest to borrow a currency for margin trading

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an isolated borrow rate structure

See: https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the borrow rate for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.code<code>string</code>Yesunified currency code
javascript
coinex.fetchIsolatedBorrowRate (symbol[, params])

<a name="fetchBorrowInterest" id="fetchborrowinterest"></a>

fetchBorrowInterest{docsify-ignore}

fetch the interest owed by the user for borrowing currency for margin trading

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of borrow interest structures

See: https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-borrow-history

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
symbol<code>string</code>Nounified market symbol when fetch interest in isolated markets
since<code>int</code>Nothe earliest time in ms to fetch borrrow interest for
limit<code>int</code>Nothe maximum number of structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchBorrowInterest ([code, symbol, since, limit, params])

<a name="borrowIsolatedMargin" id="borrowisolatedmargin"></a>

borrowIsolatedMargin{docsify-ignore}

create a loan to borrow margin

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a margin loan structure

See: https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-borrow

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, required for coinex
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>float</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.isAutoRenew<code>boolean</code>Nowhether to renew the margin loan automatically or not, default is false
javascript
coinex.borrowIsolatedMargin (symbol, code, amount[, params])

<a name="repayIsolatedMargin" id="repayisolatedmargin"></a>

repayIsolatedMargin{docsify-ignore}

repay borrowed margin and interest

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a margin loan structure

See: https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-repay

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, required for coinex
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>float</code>Yesthe amount to repay
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.borrow_id<code>string</code>Noextra parameter that is not required
javascript
coinex.repayIsolatedMargin (symbol, code, amount[, params])

<a name="fetchDepositWithdrawFee" id="fetchdepositwithdrawfee"></a>

fetchDepositWithdrawFee{docsify-ignore}

fetch the fee for deposits and withdrawals

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a fee structure

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-withdrawal-config

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchDepositWithdrawFee (code[, params])

<a name="fetchDepositWithdrawFees" id="fetchdepositwithdrawfees"></a>

fetchDepositWithdrawFees{docsify-ignore}

fetch the fees for deposits and withdrawals

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a dictionary of fee structures

See: https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config

ParamTypeRequiredDescription
codesYes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.fetchDepositWithdrawFees (codes[, params])

<a name="fetchLeverage" id="fetchleverage"></a>

fetchLeverage{docsify-ignore}

fetch the set leverage for a market

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a leverage structure

See: https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.code<code>string</code>Yesunified currency code
javascript
coinex.fetchLeverage (symbol[, params])

<a name="fetchPositionHistory" id="fetchpositionhistory"></a>

fetchPositionHistory{docsify-ignore}

fetches historical positions

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of position structures

See: https://docs.coinex.com/api/v2/futures/position/http/list-finished-position

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified contract symbol
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum amount of records to fetch, default is 10
params<code>object</code>Noextra parameters specific to the exchange api endpoint
params.until<code>int</code>Nothe latest time in ms to fetch positions for
javascript
coinex.fetchPositionHistory (symbol[, since, limit, params])

<a name="closePosition" id="closeposition"></a>

closePosition{docsify-ignore}

closes an open position for a market

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - an order structure

See: https://docs.coinex.com/api/v2/futures/position/http/close-position

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
side<code>string</code>Nobuy or sell, not used by coinex
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>Yesrequired by coinex, one of: limit, market, maker_only, ioc or fok, default is market
params.price<code>string</code>Nothe price to fulfill the order, ignored in market orders
params.amount<code>string</code>Nothe amount to trade in units of the base currency
params.clientOrderId<code>string</code>Nothe client id of the order
javascript
coinex.closePosition (symbol[, side, params])

<a name="fetchMarginAdjustmentHistory" id="fetchmarginadjustmenthistory"></a>

fetchMarginAdjustmentHistory{docsify-ignore}

fetches the history of margin added or reduced from contract isolated positions

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of margin structures

See: https://docs.coinex.com/api/v2/futures/position/http/list-position-margin-history

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
type<code>string</code>Nonot used by coinex fetchMarginAdjustmentHistory
since<code>int</code>Notimestamp in ms of the earliest change to fetch
limit<code>int</code>Nothe maximum amount of changes to fetch, default is 10
params<code>object</code>Yesextra parameters specific to the exchange api endpoint
params.until<code>int</code>Notimestamp in ms of the latest change to fetch
params.positionId<code>int</code>Nothe id of the position that you want to retrieve margin adjustment history for
javascript
coinex.fetchMarginAdjustmentHistory (symbol[, type, since, limit, params])

<a name="watchBalance" id="watchbalance"></a>

watchBalance{docsify-ignore}

watch balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a balance structure

See

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchBalance ([params])

<a name="watchMyTrades" id="watchmytrades"></a>

watchMyTrades{docsify-ignore}

watches information on multiple trades made by the user

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Nounified symbol of the market the trades were made in
since<code>int</code>Nothe earliest time in ms to watch trades
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchMyTrades ([symbol, since, limit, params])

<a name="watchTicker" id="watchticker"></a>

watchTicker{docsify-ignore}

watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchTicker (symbol[, params])

<a name="watchTickers" id="watchtickers"></a>

watchTickers{docsify-ignore}

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 <code>coinex</code>
Returns: <code>object</code> - a dictionary of ticker structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchTickers (symbols[, params])

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchTrades (symbol[, since, limit, params])

<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>

watchTradesForSymbols{docsify-ignore}

watch the most recent trades for a list of symbols

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of trade structures

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbols of the markets to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchTradesForSymbols (symbols[, since, limit, params])

<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>

watchOrderBookForSymbols{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified array of symbols
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchOrderBookForSymbols (symbols[, limit, params])

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchOrderBook (symbol[, limit, params])

<a name="watchOrders" id="watchorders"></a>

watchOrders{docsify-ignore}

watches information on multiple orders made by the user

Kind: instance method of <code>coinex</code>
Returns: <code>Array<object></code> - a list of order structures

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>bool</code>Noif the orders to watch are trigger orders or not
javascript
coinex.watchOrders (symbol[, since, limit, params])

<a name="watchBidsAsks" id="watchbidsasks"></a>

watchBidsAsks{docsify-ignore}

watches best bid & ask for symbols

Kind: instance method of <code>coinex</code>
Returns: <code>object</code> - a ticker structure

See

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
coinex.watchBidsAsks ([symbols, params])