General Info

Welcome to the Troy API.

You can use our API to access Troy API endpoints. You can view code examples in the dark area to the right.

This API reference includes all technical documentation developers need to integrate third-party applications and platforms.

This API documentation page was created with Slate.

General API Information

HTTP Return Codes

API Key Settings

Please contact us.

Email: [email protected]

Access Restriction

It will be based on IP and API Key.

Endpoint Authentication

Signature

Response Format

Response:

{
    "code" : "200",
    "operateTime" : "2020-10-12 15:02:02",
    "msg" : "success",
    "data" :  
} 

Description of response parameter field:

Name Description
code The value of the returned identification code is 200 and non-200. 200 means the call is successful, the non-200 means call fails, and the corresponding msg is the error description
operateTime Returned timestamp
msg Returned result description
data Returned result data

Note: The following returned value description only describes the part returned in the data field.

Example

The following is an example of a call to query the list of liquidation orders in the linux bash environment using echo openssl and curl tools. API Key and API Secret are only for demonstration purposes only.

Key Value
API Key OpZI6pLPRYAVN5on4D3d1FrJvVbJ4hK6
API Secret CHK5kxIQtd4WWkK8th8mBwctKF55vIEBztJ7KMnI6oniR9Rhlb1JB2WyWOhLG2GQ

address: /data/liquidation method: POST Entry:

Example

HMAC SHA256 signature:
$ echo -n "coinName=BTC&exchCode=okex&futureType=0&pageNum=1&pageSize=10&timestamp=1603271977470&type=0" | openssl dgst -sha256 -hmac "CHK5kxIQtd4WWkK8th8mBwctKF55vIEBztJ7KMnI6oniR9Rhlb1JB2WyWOhLG2GQ"
(stdin)= 7e22854ab87ee121ec5d0675f5f0b9a4c74135f021d60771c37006c60e0674c6

curl command:
(HMAC SHA256)
$ curl -H "Content-Type: application/json" -H "APIKEY: OpZI6pLPRYAVN5on4D3d1FrJvVbJ4hK6" -X POST  -d '{"signature":"7e22854ab87ee121ec5d0675f5f0b9a4c74135f021d60771c37006c60e0674c6","futureType":"0","pageSize":"10","coinName":"BTC","type":"0","pageNum":"1","exchCode":"okex","timestamp":"1603271977470"}' 'https://XXX.com/data/liquidation'
Name Value
futureType 0
pageSize 0
coinName BTC
type 0
pageNum 1
exchCode okex
timestamp 1603271977470
signature 7e22854ab87ee121ec5d0675f5f0b9a4c74135f021d60771c37006c60e0674c6

Spot Data API

Query BTC and ETH market trading volume

POST /data/volume

Response:

{
  "code": "200",
  "operateTime": "2020-10-12 15:02:02",
  "msg": "success",
  "data": {
    "x": [ ["2020-10-08", "2020-10-09", "2020-10-10", "2020-10-11"]], // Date list, unit: day  
    "y": { // y  btc and eth volume list
        "btc":[21962121001,22593173917,22877978588,19968627060], // The daily volume of btc corresponding to the x date list one by one 
        "eth":[11511016796, 12027816010, 13618484324, 12584512533]  // The daily volume of eth corresponding to the x date list one by one  
     }
  }
}

Parameters

NONE

Query large transaction info

Binance, Huobi, Gateio large transactions-daily transaction volume and daily transaction quantity (ETH/USDT, BTC/USDT currency pair)

POST /data/largeDealCount

Response:

{
  "code": "200",
  "operateTime": "2020-10-12 16:54:46",
  "msg": "success",
  "data": {
    "x": ["2020-10-09 00:00:00", "2020-10-10 00:00:00", "2020-10-11 00:00:00", "2020-10-12 00:00:00"], // Date list, unit: day      
    "y": { // Daily trading volume and daily transaction quantity 
      "volume": [ // Trading volume list corresponds with the data list x, in an array format. 0-Binance trading volume, 1-Huobi trading volum, 3-gateio trading volume
                [1424900.51695219,6736406.4003251208841856,2115610.542],
                [1267769.76562713,8207716.7674871186631543,1066589.888325],
                [463711.9401954, 5883822.563699536592668, 413152.702113],
                [931783.11420684, 4545271.9976772181351489, 272927.82946]
      ],
      "count": [ // Number of transactions list corresponds with the data list x, in an array format. 0-Binance transactions, 1-Huobi transactions, 3-gateio transactions
                [18, 87, 26],
                [17, 108, 17],
                [7, 74, 6],
                [11, 61, 4]
      ]
    }
  }
}

Parameters

NONE

Query large transaction records

Binance, Huobi, Gateio large transaction records (ETH/USDT, BTC/USDT currency pair)

POST /data/largeDealList

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-12 16:54:45",
  "msg" : "success",
  "data" : [ {
    "symbol" : "ETH/USDT", // The name of the trading pair, such as: ETH/USDT is the trading pair whose base currency is ETH, and the quote currency is USDT
    "exchCode" : "Huobi", // Exchange code, value range: Huobi, Binance, Gate.io
    "price" : 374.35, // Current order transaction price
    "qty" : 307.07, // Current order volume
    "id" : "e78344d4d2a24a09a92678c0e7c5ca22", // Primary key of current data
    "time" : "2020-10-12 16:49:52", // Current order transaction time
    "tradeId" : "110268005228122238816904647", // Current order transaction ID
    "direction" : 1 // Current order direction, 1-buy, 2-sell
  }, {
    "symbol" : "ETH/USDT",
    "exchCode" : "Binance",
    "price" : 374.98,
    "qty" : 105.93,
    "id" : "baf3e9b6f611452dba38aea2f713b536",
    "time" : "2020-10-12 16:29:32",
    "tradeId" : "195487233",
    "direction" : 2
  }, {
    "symbol" : "ETH/USDT",
    "exchCode" : "Gate.io",
    "price" : 373.48,
    "qty" : 140.69,
    "id" : "8e0f19c23f5841e6934dfa8fe70fab26",
    "time" : "2020-10-12 10:22:31",
    "tradeId" : "293181141",
    "direction" : 1
  }]
}

Parameters

NONE

Query the distribution of all currencies fluctuation

POST /data/getChangeDistribution

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-12 16:54:45",
  "msg" : "success",
  "data" : {
    "x" : [ "-40%", "-30%", "-20%", "-10%", "-5%", "0%", "5%", "10%", "20%", "30%", "40%" ], // Range of fluctuations, -40%~40%
    "y" : [ 11, 12, 24, 78, 124, 526, 1577, 107, 67, 35, 12, 27 ] // One-to-one correspondence with the fluctuations in the x list. For example, -40% and 11 indicate that the number of currencies with a less than -40% change is 11
  }
}

Parameters

NONE

Query OTC premium

POST /data/getUsdtPremiumChartNew

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-12 16:54:45",
  "msg" : "success",
  "data" : {
    "x" : [ 1602345600000, 1602259200000, 1602172800000, 1602086400000], // Premium timestamp, unit: milliseconds, UTC+8 time
    "y" : { // The price of usdt and usd at premium time respectively
      "usdt" : [ 6.72, 6.71, 6.74, 6.78], // The price of usdt to the timestamp in x. For example, 6.72 in the reference is the price of usdt at 1602345600000
      "usd" : [ 6.69, 6.69, 6.69, 6.791] // The price of usd to the timestamp in x. For example, 6.791 in the reference is the price of usd at 1602086400000
    }
  }
}

Parameters

NONE

Market abnormal changes

POST /data/abnormalChanges

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-12 16:54:45",
  "msg" : "success",
  "data" : [ {
    "dateTime" : "1602492545000", // Timestamp, unit: milliseconds, UTC+8 time
    "symbol" : "DUSK/BTC", // The name of the trading pair, such as: RUNE/USDT is the trading pair whose base currency is RUNE, and the quote currency is USDT
    "exchName" : "Binance", // Exchange name
    "changeDesc" : "New 24h High", // Change description
    "changeType" : "PriceBreakthroughs", // Type of transaction
    "volumeChanges" : "0.22254000", // Fluctuation, not multiplied by 100
    "exchCode" : "Binance" // Exchange code
  }, {
    "dateTime" : "1602491945000",
    "symbol" : "BNT/BTC",
    "exchName" : "Binance",
    "changeDesc" : "New 24h High",
    "changeType" : "PriceBreakthroughs",
    "volumeChanges" : "0.05907000",
    "exchCode" : "Binance"
  }, {
    "dateTime" : "1602491680000",
    "symbol" : "RUNE/USDT",
    "exchName" : "Binance",
    "changeDesc" : "Dump",
    "changeType" : "AbnormalPrice",
    "volumeChanges" : "-0.032258065",
    "exchCode" : "Binance"
  }
 ]
}

Parameters

NONE

Query the price fluctuations of the whole currency

POST /data/getChangeRankNew

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-12 16:54:45",
  "msg" : "success",
  "data" : {
    "fall" : [{ // A list of all currencies, sorted in ascending order of change
      "star_level" : 1,
      "marketcap" : 63450318.0,
      "code" : "zencash",
      "turnoverrate" : 10.77,
      "current_price_usd" : 6.6315, // latest price
      "ismineable" : 1,
      "low_time" : "2017-07-31",
      "supply" : 9567975.0, // Circulation
      "change_percent" : 17.78, // Change, multiplied by 100
      "vol" : 46074791.18,
      "kline_data" : "5.4032,5.4308,5.4028,5.4018,5.3267,5.2824,5.1667,5.1506,5.1104,5.1252,5.1000,5.1151,5.1086,5.2761,5.2752,5.2667,5.2914,5.3275,5.4806,5.5998,5.5269,5.5785,5.6359,5.5433,5.6962,6.0352,6.7238,6.8530",
      "rank" : 79,
      "low_price" : 3.0924, // The lowest price
      "market_value" : 427674178.0,
      "changerate_utc" : -3.8,
      "high_price" : 67.2949, // Highest price
      "market_value_usd" : 63450318.0, // Market value (USD)
      "adpairs" : [ ],
      "vol_usd" : 6835718.17, // Trading volume (USD)
      "isifo" : 0,
      "changerate_utc8" : 13.26,
      "name" : "ZEN", // Currency name
      "drop_ath" : -90.15,
      "high_time" : "2018-01-10",
      "current_price" : 44.6982,
      "fullname" : "Horizen" // Full name of the currency
    }, {
      "star_level" : 1,
      "marketcap" : 429892773.0,
      "code" : "seele",
      "turnoverrate" : 19.91,
      "current_price_usd" : 0.014329,
      "ismineable" : 0,
      "low_time" : "2019-02-07",
      "supply" : 21000000000.0,
      "change_percent" : 34.52,
      "vol" : 404581910.0,
      "kline_data" : "0.0060546,0.0060918,0.0059933,0.0059656,0.0059957,0.0061253,0.0060890,0.0060831,0.0061200,0.0061307,0.0061321,0.0064076,0.0064989,0.0066817,0.0068305,0.0075723,0.0075103,0.0074503,0.0078941,0.0085397,0.0087972,0.010448,0.011466,0.012170,0.011878,0.013149,0.014168,0.013946",
      "rank" : 38,
      "low_price" : 0.002548,
      "market_value" : 2028324379.0,
      "changerate_utc" : 0.81,
      "high_price" : 0.1884,
      "market_value_usd" : 300924941.0,
      "adpairs" : [ ],
      "vol_usd" : 60024317.92,
      "isifo" : 0,
      "changerate_utc8" : 19.12,
      "name" : "SEELE",
      "drop_ath" : -92.39,
      "high_time" : "2019-11-24",
      "current_price" : 0.096581,
      "fullname" : "Meta token"
    }],
    "rise" : [ { // A list of all currencies, sorted in descending order of change
      "star_level" : 1,
      "marketcap" : 84842571.0,
      "code" : "enigma-project",
      "turnoverrate" : 0.17,
      "current_price_usd" : 0.5656,
      "ismineable" : 1,
      "low_time" : "2020-03-13",
      "supply" : 74836171.0,
      "change_percent" : -6.67,
      "vol" : 475224.91,
      "kline_data" : "0.525328,0.508280,0.521222,0.517071,0.496751,0.681693,0.612718,0.600534,0.570949,0.570697,0.611120,0.595514,0.597554,0.605633,0.579971,0.564119,0.571708,0.563147,0.580763,0.590790,0.568977,0.575572,0.593665,0.579448,0.589381,0.570003,0.574881,0.570844",
      "rank" : 98,
      "low_price" : 0.066291,
      "market_value" : 285307604.0,
      "changerate_utc" : -0.03,
      "high_price" : 8.3033,
      "market_value_usd" : 42328621.0,
      "adpairs" : [ ],
      "vol_usd" : 70505.01,
      "isifo" : 0,
      "changerate_utc8" : 0.25,
      "name" : "ENG",
      "drop_ath" : -93.19,
      "high_time" : "2018-01-10",
      "current_price" : 3.8123,
      "fullname" : "Enigma"
    }, {
      "star_level" : 1,
      "marketcap" : 53481445.0,
      "code" : "ardor",
      "turnoverrate" : 1.76,
      "current_price_usd" : 0.053535,
      "ismineable" : 0,
      "low_time" : "2020-03-13",
      "supply" : 998999495.0,
      "change_percent" : -14.12,
      "vol" : 6364031.85,
      "kline_data" : "0.047164,0.048072,0.047951,0.048183,0.046480,0.047221,0.045797,0.044586,0.044293,0.043893,0.044506,0.046120,0.046365,0.047098,0.047393,0.046805,0.047819,0.051207,0.051479,0.051733,0.052441,0.053861,0.053532,0.051354,0.054998,0.053880,0.053506,0.053236",
      "rank" : 85,
      "low_price" : 0.022499,
      "market_value" : 360480983.0,
      "changerate_utc" : -0.23,
      "high_price" : 2.5537,
      "market_value_usd" : 53481445.0,
      "adpairs" : [ ],
      "vol_usd" : 944176.35,
      "isifo" : 0,
      "changerate_utc8" : -1.45,
      "name" : "ARDR",
      "drop_ath" : -97.90,
      "high_time" : "2018-01-13",
      "current_price" : 0.3608,
      "fullname" : "Adocoin"
    } ]
  }
}

Parameters

NONE

Contract Data API

Query the list of liquidation orders

POST /data/liquidation

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 11:17:32",
  "msg" : "success",
  "data" : [ {
    "createTime" : "2020-10-13 05:35:41", // Liquidation time
    "price" : 11749.49, // Liquidation price
    "amount" : 0.3063962776, // Size of liquidation
    "type" : "1" // Data type, value range: 0 sell to close long, 1 buy to close short
  }, {
    "createTime" : "2020-10-13 05:35:37",
    "price" : 11739.83,
    "amount" : 0.9369811998,
    "type" : "1"
  }, 
  ... ...
  ],
  "pageSize" : 20, // Number of items per page
  "totalCount" : 27, // The total number of data that meet the query conditions
  "totalPage" : 2, // The total number of data pages that meet the query conditions
  "next" : true, // Whether the next page exists, true-exist, false-not exist
  "oneHours" : 0, // Size of liquidation in 1 hour, unit: coinName value
  "twentyFourHours" : 893.16 // Size of liquidation in 24 hours, unit: coinName value
}

Parameters

Name Mandatory Description
exchCode yes Query code, value range: tdm, okex
coinName no Currency name, value range: BTC, ETH, EOS, LTC, XRP, BCH. It is used when exchCode is okex. When exchCode is tdm, the field value defaults to BTC
type yes Query data type, value range: 0 sell to close long, 1 buy to close short
futureType no Contract type, 0-current week, 1-second week, 2-quarter. Required when exchCode is okex
pageNum no Pagination page number, starting from 1, the default value is 1
pageSize no The number of items per page, the default value is 10

Query Bitmex perpetual contract rate

POST /data/getContractRate/XBTUSD

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 12:05:55",
  "msg" : "success",
  "data" : {
    "rate" : [0.01, 0.01, 0.0099, 0.01, 0.01, 0.01 ], // List of contract rates
    "time" : ["10-12 04:00:00", "10-12 12:00:00", "10-12 20:00:00", "10-13 04:00:00", "10-13 12:00:00", "10-13 20:00:00" ] // Time list, one-to-one correspondence with contract rate list
  }
}

Parameters

NONE

Query Bitmex large order list

POST /data/largeDeal

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 13:56:21",
  "msg" : "success",
  "data" : {
    "shortRate" : "50.28 %", // Average proportion of short positions
    "longRate" : "49.72 %", // Average proportion of long positions
    "longCount" : "135575499", // The total value of long positions, unit: USD
    "shortCount" : "137078043", // The total value of short positions, unit: USD
    "current_price" : "11512", // latest price
    "longs" : [ { // List of long positions
      "date" : "1602567360", // Position timestamp, unit: second
      "now" : [ 11512, 0.00 ], // Array, position 0 is the current price, position 1 is the current profit
      "count" : "136379", // Trading volume
      "id" : "63a265d", // Primary key of current data
      "position" : "11512" // Position price
    }, {
      "date" : "1602566940",
      "now" : [ 11512, 8.69 ],
      "count" : "200001",
      "id" : "a5f9991",
      "position" : "11511.5"
    }],
    "shorts" : [ { // List of short positions
      "date" : "1602567780",
      "now" : [ 11512 34.77 ],
      "count" : "114410",
      "id" : "0dcf5cf",
      "position" : "11515.5"
    }, {
      "date" : "1602566820",
      "now" : [ 11512, -26.06 ],
      "count" : "150000",
      "id" : "62b0e67",
      "position" : "11510"
    } ]
  }
}

Parameters

NONE

Query Bitfinex holdings-minutes

POST /data/getBitfinexPositionRatio/minute

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 13:56:21",
  "msg" : "success",
  "data" : {
    "shortRatio" : 13, // Short positions ratio, multiplied by 100
    "longRatio" : 87, // Long positions ratio, multiplied by 100
    "longs" : [{ // Long positions value
      "vol" : "26466.70824900", // Open interest
      "id" : 1648961, // Primary key
      "time" : 1602558900 // Data statistics time, unit: second
    }, {
      "vol" : "26466.68324900",
      "id" : 1648962,
      "time" : 1602558960
    }, {
      "vol" : "26466.68824900",
      "id" : 1648963,
      "time" : 1602559020
    }, {
      "vol" : "26466.68324900",
      "id" : 1648964,
      "time" : 1602559080
    } ],
    "shorts" : [{ // Short positions value
      "vol" : "3888.13468400",
      "id" : 1648962,
      "time" : 1602558900
    }, {
      "vol" : "3888.14189700",
      "id" : 1648963,
      "time" : 1602558960
    }, {
      "vol" : "3888.14689700",
      "id" : 1648964,
      "time" : 1602559020
    }, {
      "vol" : "3888.15189700",
      "id" : 1648965,
      "time" : 1602559080
    } ]
  }
}

Parameters

NONE

Query Bitfinex holdings-hour

POST /data/getBitfinexPositionRatio/hour

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 14:12:02",
  "msg" : "success",
  "data" : {
    "shortRatio" : 13, // Short positions ratio, multiplied by 100
    "longRatio" : 87, // Long positions ratio, multiplied by 100
    "longs" : [{ // Long positions value
      "vol" : "26455.53198100", // Open interest
      "id" : 1648766, // Primary key
      "time" : 1602547200 // Data statistics time, unit: second
    }, {
      "vol" : "26482.10045500",
      "id" : 1648826,
      "time" : 1602550800
    }, {
      "vol" : "26488.55597300",
      "id" : 1648886,
      "time" : 1602554400
    }, {
      "vol" : "26487.57377500",
      "id" : 1648946,
      "time" : 1602558000
    }],
    "shorts" : [{ // Short positions value
      "vol" : "3926.64830800",
      "id" : 1648767,
      "time" : 1602547200
    }, {
      "vol" : "3908.23789800",
      "id" : 1648827,
      "time" : 1602550800
    }, {
      "vol" : "3894.05303600",
      "id" : 1648887,
      "time" : 1602554400
    }, {
      "vol" : "3889.55205800",
      "id" : 1648947,
      "time" : 1602558000
    }]
  }
}

Parameters

NONE

Query Bitfinex holdings--days

POST /data/getBitfinexPositionRatio/day

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 14:12:04",
  "msg" : "success",
  "data" : {
    "shortRatio" : 13, // Short positions ratio, multiplied by 100
    "longRatio" : 87, // Long positions ratio, multiplied by 100
    "longs" : [{ // Long positions value
      "vol" : "25961.51202700", // Open interest
      "id" : 1644446, // Primary key
      "time" : 1602288000 // Data statistics time, unit: second
    }, {
      "vol" : "26139.77604800",
      "id" : 1645886,
      "time" : 1602374400
    }, {
      "vol" : "26023.87709000",
      "id" : 1647326,
      "time" : 1602460800
    }, {
      "vol" : "26455.53198100",
      "id" : 1648766,
      "time" : 1602547200
    } ],
    "shorts" : [{ // Short positions value
      "vol" : "3596.86838400",
      "id" : 1644447,
      "time" : 1602288000
    }, {
      "vol" : "3717.20635900",
      "id" : 1645887,
      "time" : 1602374400
    }, {
      "vol" : "3838.40170400",
      "id" : 1647327,
      "time" : 1602460800
    }, {
      "vol" : "3926.64830800",
      "id" : 1648767,
      "time" : 1602547200
    }]
  }
}

Parameters

NONE

Query the total amount of okex contract holdings

POST /data/futureVolume

Response:

{
  "code": "200",
  "operateTime": "2020-10-13 14:50:13",
  "msg": "success",
  "data": {
  "x": [1602554400000, 1602558000000, 1602561600000, 1602565200000, 1602568800000], // Time list, unit: millisecond
  "y": [927667972, 923783068, 915808108, 916088500, 918525124] // The total value of the position, corresponding to the element of x
  }
}

Parameters

Name Mandatory Description
coinName no Currency name, the default value is BTC
type yes Query type, 0-5 minutes, 1-hour, 2-day

Check contract premium

POST /data/futuresPremium

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 14:54:35",
  "msg" : "success",
  "data" : {
    "x" :[1602571805000,1602571865000,1602571925000,1602571985000,1602572045000 ], // Premium statistics time, unit: milliseconds
    "y" : { // The value of futures and spot at each point in time
      "y1" : ["11724.67", "11721.07", "11726.16", "11726.16", "11729.66" ], // Futures price, one-to-one correspondence with the time value of x
      "y2" : ["11480.75", "11478.278", "11477.828", "11480.06", "11480.784" ] // Spot price, corresponding to the time value of x
    },
    "lastInfo" : { // The first premium information in the query type
      "coinPrice" : "11377.11", // Spot price
      "futuresPrice" : "11606.13", // Futures price
      "premiumRate" : "0.0201" // Premium rate, not multiplied by 100
    }
  }
}

Parameters

Name Mandatory Description
coinName no Currency name, the default value is BTC
type yes Query type, 1-1 days, 3-3 days, 7-7 days

Query trading elite trend indicators

POST /data/eliteTradingScale

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 15:19:35",
  "msg" : "success",
  "data" : {
    "x" : ["1602558000000", "1602561600000", "1602565200000", "1602568800000", "1602572400000" ], // Time list, unit: millisecond
    "y" : { // Account ratio list
      "y1" : [0.45, 0.45, 0.44, 0.44, 0.45 ], // Long account ratio, which corresponds to the time in the x element one-to-one
      "y2" : [0.51, 0.51, 0.52, 0.52, 0.51 ] // Short account ratio, which corresponds to the time in the x element one-to-one
    }
  }
}

Parameters

Name Mandatory Description
coinName no Currency name, the default value is BTC
type yes Query type, 0-5 minutes, 1-15 minutes, 2-1 hours

Query the average long-short position ratio of trading elites

POST /data/eliteTradingPositionRatio

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 15:28:34",
  "msg" : "success",
  "data" : {
    "x" : ["1602569700000", "1602570600000", "1602571500000", "1602572400000", "1602573300000" ], // Time list, unit: millisecond
    "y" : { // Average long-short position ratio of trading elites
      "y1" : [0.1785, 0.1795, 0.1811, 0.1805, 0.1827 ], // Proportion of long positions
      "y2" : [0.1461, 0.1441, 0.1431, 0.1434, 0.1384 ] // Proportion of short positions
    }
  }
}

Parameters

Name Mandatory Description
coinName no Currency name, the default value is BTC
type yes Query type, 0-5 minutes, 1-15 minutes, 2-1 hours

On-Chain Trading Data API

Query the number of transactions on the chain

POST /data/blockchainchart/transactions

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 16:14:12",
  "msg" : "success",
  "data" : {
    "btc" : [330065, 339201, 298343, 255956, 314025 ], // List, the number of btc transactions, one-to-one correspondence with the date of time
    "eth" : [1019446, 1049571, 1036351, 1004701, 1092162 ], // List, the number of eth transactions, one-to-one correspondence with the date of time
    "time" : ["2020/10/08", "2020/10/09", "2020/10/10", "2020/10/11", "2020/10/12" ] // List, date statistics
  }
}

Parameters

NONE

Query the transaction amount on the chain

POST /data/blockchainchart/sentinusd

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 16:14:12",
  "msg" : "success",
  "data" : {
    "btc" : [21706716941, 30299583193, 21139901276, 24238874866, 24859248642 ], // List, btc transaction amount, one-to-one correspondence with the date of time
    "eth" : [1025495851, 1171018453, 873078675, 735078848, 1250834303 ], // List, eth transaction amount, one-to-one correspondence with the date of time
    "time" : ["2020/10/08", "2020/10/09", "2020/10/10", "2020/10/11", "2020/10/12" ] // List, date of statistics
  }
}

Parameters

NONE

Query the average transaction volume

POST /data/blockchainchart/transactionvalue

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 16:14:12",
  "msg" : "success",
  "data" : {
    "btc" : [65765, 89326, 70858, 94699, 79163 ], // List, btc transaction value, one-to-one correspondence with the date of time
    "eth" : [1006, 1116, 842.455, 731.639, 1145 ], // List, eth transaction value, one-to-one correspondence with the date of time
    "time" : ["2020/10/08", "2020/10/09", "2020/10/10", "2020/10/11", "2020/10/12" ] // List, date of statistics
  }
}

Parameters

NONE

Query the number of active addresses

POST /data/blockchainchart/activeaddresses

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 16:14:12",
  "msg" : "success",
  "data" : {
    "btc" : [835611, 786581, 657480, 812638, 830532 ], // List, the number of active btc addresses, one-to-one correspondence with the date of time
    "eth" : [546127, 538713, 524122, 540422, 548076 ], // List, the number of active eth addresses, one-to-one correspondence with the date of time
    "time" : ["2020/10/09", "2020/10/10", "2020/10/11","2020/10/12", "2020/10/13" ] // List, date statistics
  }
}

Parameters

NONE

Query the list of large transfers

POST /lydata/largetransferAll

Response:

{
  "code" : "200",
  "operateTime" : "2020-10-13 16:14:13",
  "msg" : "success",
  "data" : {
    "navigatepageNums" : [ 1, 2, 3, 4, 5, 6, 7, 8 ],
    "startRow" : 1, // Start line
    "hasNextPage" : true, // Whether the next page exists, true-exist, false-not exist
    "prePage" : 0, // Previous page
    "nextPage" : 2, // Next Page
    "endRow" : 50, // End line
    "pageSize" : 50, // Page size
    "list" : [ { // List of large transfers
      "amount" : "160.00", // Number of transfers
      "toSource" : "",
      "blockTime" : "10-13 15:21", // Transfer time
      "fromAddress" : "1HiTyftkSA***Bqhm【Huobi】", // Outgoing address
      "toAddress" : "1MXwQHbdgX***RaTs", // Transfer-in address
      "fromSource" : "Huobi", // Transfer source
      "coin" : "BTC" // The name of the currency to be transferred out
    }, {
      "amount" : "130.00",
      "toSource" : "",
      "blockTime" : "10-13 14:40",
      "fromAddress" : "3LCGsSmfr2***HFqh【Top 100 holders】",
      "toAddress" : "bc1qvx4ara***4vdd",
      "fromSource" : "Top 100 holders",
      "coin" : "BTC"
    }],
    "pageNum" : 1, // Current page number
    "navigatePages" : 8,
    "navigateFirstPage" : 1,
    "total" : 32451, // Total number
    "pages" : 650, // total pages
    "size" : 50,
    "isLastPage" : false, // Whether the last page, true-yes, false-no
    "hasPreviousPage" : false, // Whether the previous page exists, true-exist, false-not exist
    "navigateLastPage" : 8,
    "isFirstPage" : true // Whether the first page, true-yes, false-no
  }
}

Parameters

Name Mandatory Description
coinName yes Currency name, value range: BTC, ETH, USDT
pageNum no Query the page number, starting from 1. Default value 1
pageSize no Query the number of items per page, the default value is 10