All URIs are relative to https://dex-api.coinex.org
| Method | HTTP request | Description |
|---|---|---|
| queryBlockTimes | GET /misc/block-times | Query block time |
| queryDonation | GET /misc/donations | Query donations info |
| queryLastBlock | GET /misc/height | Query least block info |
[Number] queryBlockTimes(height, count)
Query block time
Query the block time up to given height
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MiscApi();
let height = 789; // Number | Block height
let count = 56; // Number | Querier count limited to 1024
apiInstance.queryBlockTimes(height, count).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| height | Number | Block height | |
| count | Number | Querier count limited to 1024 |
[Number]
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20054 queryDonation(time, sid, count)
Query donations info
Query donations by DonateToCommunityPool or CommentToken
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MiscApi();
let time = 789; // Number | Unix timestamp
let sid = 789; // Number | Sequence id
let count = 56; // Number | Querier count limited to 1024
apiInstance.queryDonation(time, sid, count).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| time | Number | Unix timestamp | |
| sid | Number | Sequence id | |
| count | Number | Querier count limited to 1024 |
No authorization required
- Content-Type: Not defined
- Accept: application/json
InlineResponse20053 queryLastBlock()
Query least block info
Query least block info
import DexApiNodejs from 'dex-api-nodejs';
let apiInstance = new DexApiNodejs.MiscApi();
apiInstance.queryLastBlock().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