zebpay
zebpay cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
zebpay
Kind: global class
Extends: Exchange
- fetchStatus
- fetchTime
- fetchMarkets
- fetchCurrencies
- fetchTradingFee
- fetchTradingFees
- fetchOrderBook
- fetchTicker
- fetchTickers
- fetchOHLCV
- fetchTrades
- fetchMyTrades
- fetchBalance
- createOrder
- cancelOrder
- cancelOrders
- fetchOpenOrders
- fetchOrder
- closePosition
- fetchLeverages
- fetchLeverage
- setLeverage
- fetchPositions
- addMargin
- reduceMargin
fetchStatus
the latest known information on the availability of the exchange API
Kind: instance method of zebpay
Returns: object - a status structure
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#system-status
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/system.md#get-system-status
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
zebpay.fetchStatus (params?)fetchTime
fetches the current integer timestamp in milliseconds from the poloniexfutures server
Kind: instance method of zebpay
Returns: int - the current integer timestamp in milliseconds from the poloniexfutures server
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-server-time
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/system.md#get-system-time
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
zebpay.fetchTime (params?)fetchMarkets
retrieves data on all markets for zebpay
Kind: instance method of zebpay
Returns: Array<object> - an array of objects representing market data
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-trading-pairs
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#fetch-markets
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange api endpoint |
zebpay.fetchMarkets (params?)fetchCurrencies
fetches all available currencies on an exchange
Kind: instance method of zebpay
Returns: object - an associative dictionary of currencies
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
zebpay.fetchCurrencies (params?)fetchTradingFee
fetch the trading fees for a market
Kind: instance method of zebpay
Returns: object - a status structure
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-exchange-fee
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/exchange.md#get-trade-fee-single-symbol
| 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.side | object | No | side to fetch trading fee |
zebpay.fetchTradingFee (symbol, params?)fetchTradingFees
fetch the trading fees for multiple markets
Kind: instance method of zebpay
Returns: object - a status structure
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
zebpay.fetchTradingFees (params?)fetchOrderBook
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of zebpay
Returns: object - A dictionary of order book structures
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-order-book
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#get-order-book
| 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 |
zebpay.fetchOrderBook (symbol, limit?, params?)fetchTicker
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of zebpay
Returns: object - a ticker structure
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-ticker
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#get-24hr-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 |
zebpay.fetchTicker (symbol, params?)fetchTickers
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of zebpay
Returns: object - a dictionary of ticker structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | 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 |
zebpay.fetchTickers (symbols, params?)fetchOHLCV
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of zebpay
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-klinescandlesticks
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#-get-k-lines-ohlcv-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 |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.endtime | int | No | the latest time in ms to fetch orders for |
zebpay.fetchOHLCV (symbol, timeframe, since?, limit?, params?)fetchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of zebpay
Returns: Array<Trade> - a list of trade structures
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/public-endpoints.md#get-recent-trades
- https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/public-endpoints/market.md#get-aggregate-trades
| 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 |
zebpay.fetchTrades (symbol, since?, limit?, params?)fetchMyTrades
get the list of most recent trades for a particular symbol
Kind: instance method of zebpay
Returns: Array<Trade> - a list of trade structures
| 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 |
zebpay.fetchMyTrades (symbol, since?, limit?, params?)fetchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of zebpay
Returns: object - a balance structure
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-account-balance
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/wallet.md#get-wallet-balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
zebpay.fetchBalance (params?)createOrder
Create an order on the exchange
Kind: instance method of zebpay
Returns: object - an order structure
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#place-new-order
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#--create-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| type | string | Yes | 'limit' or 'market' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | the amount of currency to trade |
| 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 |
| params.formType | string | No | The price at which a trigger order is triggered at |
| params.marginAsset | string | No | The asset the order creates, default is INR. |
| params.takeProfit | boolean | No | Takeprofit flag for the order. |
| params.stopLoss | boolean | No | Stop loss flag for the order. |
| params.positionId | string | No | PositionId of the order. |
zebpay.createOrder (symbol, type, side, amount, price?, params?)cancelOrder
cancels an open order
Kind: instance method of zebpay
Returns: object - An order structure
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#cancel-order
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-cancel-order
| 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.timestamp | object | No | extra parameters specific to the exchange API endpoint |
zebpay.cancelOrder (id, symbol, params?)cancelOrders
cancels all open orders
Kind: instance method of zebpay
Returns: object - An order structure
| Param | Type | Required | Description |
|---|---|---|---|
| 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.timestamp | object | No | extra parameters specific to the exchange API endpoint |
zebpay.cancelOrders (symbol, params?)fetchOpenOrders
fetches information on multiple open orders made by the user
Kind: instance method of zebpay
Returns: Array<Order> - a list of order structures
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-orders
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-get-open-orders
| 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 |
zebpay.fetchOpenOrders (symbol, since?, limit?, params?)fetchOrder
fetches information on an order made by the user
Kind: instance method of zebpay
Returns: object - An order structure
See
- [Spot] https://github.com/zebpay/zebpay-api-references/blob/main/spot/api-reference/private-endpoints.md#get-order-details
- [Swap] https://github.com/zebpay/zebpay-api-references/blob/main/futures/api-reference/private-endpoints/trade.md#-get-order-details
| 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 | cancel order by client order id |
| params.timestamp | string | No | cancel order by client order id |
zebpay.fetchOrder (id, symbol, params?)closePosition
closes open positions for a market
Kind: instance method of zebpay
Returns: Array<object> - A list of position structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| side | string | Yes | not used by kucoinfutures closePositions |
| params | object | No | extra parameters specific to the okx api endpoint |
| params.positionId | string | No | client order id of the order |
zebpay.closePosition (symbol, side, params?)fetchLeverages
fetch the set leverage for all contract and margin markets
Kind: instance method of zebpay
Returns: object - a list of leverage structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | a list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
zebpay.fetchLeverages (symbols?, params?)fetchLeverage
fetch the set leverage for a market
Kind: instance method of zebpay
Returns: object - a leverage structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
zebpay.fetchLeverage (symbol, params?)setLeverage
set the level of leverage for a market
Kind: instance method of zebpay
Returns: object - response from the exchange
| 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 |
zebpay.setLeverage (leverage, symbol, params?)fetchPositions
Fetches current contract trading positions
Kind: instance method of zebpay
Returns: Parsed exchange response for positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | List of unified symbols |
| params | object | No | Not used by krakenfutures |
zebpay.fetchPositions (symbols, params?)addMargin
add margin
Kind: instance method of zebpay
Returns: object - a margin structure
| 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.positionId | string | No | PositionId of the order to add margin. |
| params.timestamp | string | No | Tiemstamp. |
zebpay.addMargin (symbol, amount, params?)reduceMargin
add margin
Kind: instance method of zebpay
Returns: object - a margin structure
| 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.positionId | string | No | PositionId of the order to add margin. |
| params.timestamp | string | No | Tiemstamp. |
zebpay.reduceMargin (symbol, amount, params?)