All URIs are relative to https://dex-api.coinex.org
| Method | HTTP request | Description |
|---|---|---|
| cancelOrder | POST /market/cancel-order | Cancel the order |
| cancelTradingPair | POST /market/cancel-trading-pair | Cancel the trading-pair |
| createGteOrder | POST /market/gte-orders | Create GTE order in blockchain |
| createIocOrder | POST /market/ioc-orders | Create IOC order in blockchain |
| createTradingPair | POST /market/trading-pairs | Create trading-pair in blockchain |
| getMarketParams | GET /market/parameters | Get the current market parameters |
| getOrder | GET /market/orders/{order-id} | Query order info |
| getOrders | GET /market/orders/account/{address} | Query user order-id list |
| getOrdersInMarket | GET /market/orderbook/{stock}/{money} | Query trading-pair's orderbook |
| getTradingPair | GET /market/trading-pairs/{stock}/{money} | Query trading-pair info |
| modifyPricePrecision | POST /market/price-precision | Modify the price precision of the trading pair in the dex |
| queryCandleStick | GET /market/candle-sticks | Query market candleStick |
| queryDeal | GET /market/deals | Query market deal |
| queryDepth | GET /market/depths | Query market depth |
| queryOrder | GET /market/user-orders | Query account's order |
| queryTickers | GET /market/tickers | Query market tickers |
| queryTradingPairs | GET /market/exist-trading-pairs | Query all trading-pair infos in blockchain |
StdTx cancelOrder(orderInfo)
Cancel the order
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let orderInfo = new DexApiNodejs.InlineObject27(); // InlineObject27 |
apiInstance.cancelOrder(orderInfo).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| orderInfo | InlineObject27 |
No authorization required
- Content-Type: application/json
- Accept: application/json
StdTx cancelTradingPair(info)
Cancel the trading-pair
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let info = new DexApiNodejs.InlineObject28(); // InlineObject28 |
apiInstance.cancelTradingPair(info).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| info | InlineObject28 |
No authorization required
- Content-Type: application/json
- Accept: application/json
StdTx createGteOrder(orderInfo)
Create GTE order in blockchain
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let orderInfo = new DexApiNodejs.UNKNOWN_BASE_TYPE(); // UNKNOWN_BASE_TYPE | create order tx
apiInstance.createGteOrder(orderInfo).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| orderInfo | UNKNOWN_BASE_TYPE | create order tx |
No authorization required
- Content-Type: application/json
- Accept: application/json
StdTx createIocOrder(orderInfo)
Create IOC order in blockchain
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let orderInfo = new DexApiNodejs.UNKNOWN_BASE_TYPE(); // UNKNOWN_BASE_TYPE | create order tx
apiInstance.createIocOrder(orderInfo).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| orderInfo | UNKNOWN_BASE_TYPE | create order tx |
No authorization required
- Content-Type: application/json
- Accept: application/json
StdTx createTradingPair(info)
Create trading-pair in blockchain
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let info = new DexApiNodejs.UNKNOWN_BASE_TYPE(); // UNKNOWN_BASE_TYPE | Create trading-pair
apiInstance.createTradingPair(info).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| info | UNKNOWN_BASE_TYPE | Create trading-pair |
No authorization required
- Content-Type: application/json
- Accept: application/json
InlineResponse20042 getMarketParams()
Get the current market parameters
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
apiInstance.getMarketParams().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20046 getOrder(orderId)
Query order info
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let orderId = coinex1dmz7e2fddhejdz5n7e3qc5szx3zn2gj3ta8rwj; // String | The order id
apiInstance.getOrder(orderId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | String | The order id |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20047 getOrders(address)
Query user order-id list
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let address = coinex1dmz7e2fddhejdz5n7e3qc5szx3zn2gj3ta8rwj; // String | The user address
apiInstance.getOrders(address).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| address | String | The user address |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20045 getOrdersInMarket(stock, money)
Query trading-pair's orderbook
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let stock = btc; // String | stock symbol
let money = cet; // String | money symbol
apiInstance.getOrdersInMarket(stock, money).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| stock | String | stock symbol | |
| money | String | money symbol |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20044 getTradingPair(stock, money)
Query trading-pair info
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let stock = btc; // String | stock symbol
let money = cet; // String | money symbol
apiInstance.getTradingPair(stock, money).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| stock | String | stock symbol | |
| money | String | money symbol |
No authorization required
- Content-Type: Not defined
- Accept: application/json
StdTx modifyPricePrecision(info)
Modify the price precision of the trading pair in the dex
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let info = new DexApiNodejs.InlineObject26(); // InlineObject26 |
apiInstance.modifyPricePrecision(info).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| info | InlineObject26 |
No authorization required
- Content-Type: application/json
- Accept: application/json
[CandleStick] queryCandleStick(market, timespan, time, sid, count)
Query market candleStick
Query candleStick until to given time
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let market = "market_example"; // String | stock/money
let timespan = "timespan_example"; // String | 1min/1hour/1day
let time = 789; // Number | Unix timestamp
let sid = 789; // Number | Sequence id
let count = 56; // Number | Querier candleStick count limited to 1024
apiInstance.queryCandleStick(market, timespan, time, sid, count).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| market | String | stock/money | |
| timespan | String | 1min/1hour/1day | |
| time | Number | Unix timestamp | |
| sid | Number | Sequence id | |
| count | Number | Querier candleStick count limited to 1024 |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20056 queryDeal(market, time, sid, count)
Query market deal
Query market deal until to given time
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let market = "market_example"; // String | stock/money
let time = 789; // Number | Unix timestamp
let sid = 789; // Number | Sequence id
let count = 56; // Number | Querier deal count limited to 1024
apiInstance.queryDeal(market, time, sid, count).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| market | String | stock/money | |
| time | Number | Unix timestamp | |
| sid | Number | Sequence id | |
| count | Number | Querier deal count limited to 1024 |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20055 queryDepth(market, count)
Query market depth
Query purchases and sales of a market at all price levels
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let market = "market_example"; // String | stock/money
let count = 56; // Number | Querier count limited to 1024
apiInstance.queryDepth(market, count).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| market | String | stock/money | |
| count | Number | Querier count limited to 1024 |
No authorization required
- Content-Type: Not defined
- Accept: application/json
UserOrder queryOrder(account, time, sid, count, opts)
Query account's order
Query account's order activities in all markets until to given time
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let account = "account_example"; // String | Bech32 address
let time = 789; // Number | Unix timestamp
let sid = 789; // Number | Sequence id
let count = 56; // Number | Querier order count limited to 1024
let opts = {
'token': "token_example", // String | Symbol
'tag': "tag_example" // String | Filter responses type by tag string create/fill/cancel
};
apiInstance.queryOrder(account, time, sid, count, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| account | String | Bech32 address | |
| time | Number | Unix timestamp | |
| sid | Number | Sequence id | |
| count | Number | Querier order count limited to 1024 | |
| token | String | Symbol | [optional] |
| tag | String | Filter responses type by tag string create/fill/cancel | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Tickers] queryTickers(marketList)
Query market tickers
Query tickers info
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
let marketList = ["null"]; // [String] | Market count limited to 1~100
apiInstance.queryTickers(marketList).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| marketList | [String] | Market count limited to 1~100 |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20043 queryTradingPairs()
Query all trading-pair infos in blockchain
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MarketApi();
apiInstance.queryTradingPairs().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json