美文网首页区块链研习社互联网科技程序员
CoinCap API 查询主流交易所交易基本数据 - 区块链数

CoinCap API 查询主流交易所交易基本数据 - 区块链数

作者: 极客红石 | 来源:发表于2019-03-09 22:02 被阅读35次

简介:CoinCap 是查询超过1,000种加密货币实时定价和市场活动的有用工具。通过收集来自数千个市场的交换数据,能够提供有关资产价格和可用性透明而准确的数据。本文整理 CoinCap API 查询主流交易所交易基本数据的基础操作和介绍。

CoinCap 是查询超过1,000种加密货币实时定价和市场活动的有用工具。通过收集来自数千个市场的交换数据,能够提供有关资产价格和可用性透明而准确的数据。本文整理 CoinCap API 查询主流交易所交易基本数据的基础操作和介绍。

CoinCap 对于所有端口,默认情况下,单个页面提供100个响应,并且在请求时每页最多支持2,000个响应。

CoinCap API 服务包括 RESTful API 和 WebSocket API 两种。通过 CoinCap API 查询数据不需要申请密钥。

基础查询语句:

api.coincap.io/v2/exchanges

Node.js 代码示例:

const fetch = require('node-fetch');

fetch('https://api.coincap.io/v2/exchanges', {
    method: 'get',
}).then(response => response.json()
    .then(data => console.log(data.data)));

返回的JSON示例:

{
  "data": [
    {
      "exchangeId": "bithumb",
      "name": "Bithumb",
      "rank": "1",
      "percentTotalVolume": "13.180618461459902029000000000000000000",
      "volumeUsd": "1050255002.7260864542465813",
      "tradingPairs": "43",
      "socket": false,
      "exchangeUrl": "https://www.bithumb.com/",
      "updated": 1552123659886
    },
    {
      "exchangeId": "binance",
      "name": "Binance",
      "rank": "2",
      "percentTotalVolume": "12.675874854900706174000000000000000000",
      "volumeUsd": "1010036138.9881790184484865",
      "tradingPairs": "376",
      "socket": true,
      "exchangeUrl": "https://www.binance.com/",
      "updated": 1552123681908
    },
    {
      "exchangeId": "okex",
      "name": "Okex",
      "rank": "3",
      "percentTotalVolume": "10.714772406504151067000000000000000000",
      "volumeUsd": "853772025.6380131637625569",
      "tradingPairs": "474",
      "socket": false,
      "exchangeUrl": "https://www.okex.com/",
      "updated": 1552123681360
    },
    {
      "exchangeId": "lbank",
      "name": "LBank",
      "rank": "4",
      "percentTotalVolume": "8.380806834193909035000000000000000000",
      "volumeUsd": "667797518.7757774582526896",
      "tradingPairs": "90",
      "socket": false,
      "exchangeUrl": "https://www.lbank.info",
      "updated": 1552123681624
    },
    {
      "exchangeId": "zb",
      "name": "ZB",
      "rank": "5",
      "percentTotalVolume": "8.086744170802861765000000000000000000",
      "volumeUsd": "644366085.3992288288132706",
      "tradingPairs": "80",
      "socket": true,
      "exchangeUrl": "https://www.zb.com/",
      "updated": 1552123680987
    },
    {
      "exchangeId": "bibox",
      "name": "Bibox",
      "rank": "6",
      "percentTotalVolume": "7.983399355546282854000000000000000000",
      "volumeUsd": "636131387.6461308809653910",
      "tradingPairs": "154",
      "socket": false,
      "exchangeUrl": "https://www.bibox.com",
      "updated": 1552123681415
    },
    {
      "exchangeId": "bit-z",
      "name": "Bit-Z",
      "rank": "7",
      "percentTotalVolume": "7.802543556430176027000000000000000000",
      "volumeUsd": "621720477.5398173413467825",
      "tradingPairs": "141",
      "socket": false,
      "exchangeUrl": "https://www.bit-z.com/",
      "updated": 1552122987980
    },
    {
      "exchangeId": "hitbtc",
      "name": "HitBTC",
      "rank": "8",
      "percentTotalVolume": "7.459796580179902954000000000000000000",
      "volumeUsd": "594409791.9654913009337983",
      "tradingPairs": "679",
      "socket": true,
      "exchangeUrl": "https://hitbtc.com/",
      "updated": 1552123674101
    },
    {
      "exchangeId": "huobi",
      "name": "Huobi",
      "rank": "9",
      "percentTotalVolume": "6.849495165846604258000000000000000000",
      "volumeUsd": "545779895.3146964978362921",
      "tradingPairs": "286",
      "socket": true,
      "exchangeUrl": "https://www.hbg.com/",
      "updated": 1552123680976
    },
    {
      "exchangeId": "bitfinex",
      "name": "Bitfinex",
      "rank": "10",
      "percentTotalVolume": "2.038674838647082897000000000000000000",
      "volumeUsd": "162445218.6732777792212608",
      "tradingPairs": "258",
      "socket": true,
      "exchangeUrl": "https://bitfinex.com",
      "updated": 1552123637509
    },
    {
      "exchangeId": "qryptos",
      "name": "Liquid",
      "rank": "11",
      "percentTotalVolume": "1.794018432494432591000000000000000000",
      "volumeUsd": "142950563.3001530514695278",
      "tradingPairs": "135",
      "socket": false,
      "exchangeUrl": "https://www.qryptos.com/",
      "updated": 1552123659066
    },
    {
      "exchangeId": "quoine",
      "name": "Quoine",
      "rank": "12",
      "percentTotalVolume": "1.789490500015047203000000000000000000",
      "volumeUsd": "142589769.6278086573469077",
      "tradingPairs": "28",
      "socket": false,
      "exchangeUrl": "https://quoine.com/",
      "updated": 1552123681616
    },
    {
      "exchangeId": "ooobtc",
      "name": "OOOBTC",
      "rank": "13",
      "percentTotalVolume": "1.552115110059841705000000000000000000",
      "volumeUsd": "123675278.5093928921024042",
      "tradingPairs": "26",
      "socket": false,
      "exchangeUrl": "https://www.ooobtc.com/",
      "updated": 1552123679133
    },
    {
      "exchangeId": "coinbene",
      "name": "Coinbene",
      "rank": "14",
      "percentTotalVolume": "1.423446815839395895000000000000000000",
      "volumeUsd": "113422761.1413810471068400",
      "tradingPairs": "111",
      "socket": false,
      "exchangeUrl": "https://www.coinbene.com",
      "updated": 1552123680986
    },
    {
      "exchangeId": "sistemkoin",
      "name": "Sistemkoin",
      "rank": "15",
      "percentTotalVolume": "1.214719035702210389000000000000000000",
      "volumeUsd": "96790962.2665421390653709",
      "tradingPairs": "132",
      "socket": false,
      "exchangeUrl": "https://www.sistemkoin.com",
      "updated": 1552123646902
    },
    {
      "exchangeId": "allcoin",
      "name": "Allcoin",
      "rank": "16",
      "percentTotalVolume": "1.199304210725798587000000000000000000",
      "volumeUsd": "95562681.7351724181106563",
      "tradingPairs": "40",
      "socket": false,
      "exchangeUrl": "https://allcoin.com/",
      "updated": 1552123680704
    },
    {
      "exchangeId": "gdax",
      "name": "Coinbase Pro",
      "rank": "17",
      "percentTotalVolume": "1.026947774766785782000000000000000000",
      "volumeUsd": "81829015.9252342604491714",
      "tradingPairs": "32",
      "socket": true,
      "exchangeUrl": "https://pro.coinbase.com/",
      "updated": 1552123681465
    },
    {
      "exchangeId": "kraken",
      "name": "Kraken",
      "rank": "18",
      "percentTotalVolume": "0.848881798386823041000000000000000000",
      "volumeUsd": "67640403.8312576754632120",
      "tradingPairs": "69",
      "socket": false,
      "exchangeUrl": "https://kraken.com",
      "updated": 1552123681351
    },
    {
      "exchangeId": "bitstamp",
      "name": "Bitstamp",
      "rank": "19",
      "percentTotalVolume": "0.651564015427827243000000000000000000",
      "volumeUsd": "51917773.7220972311137841",
      "tradingPairs": "15",
      "socket": true,
      "exchangeUrl": "https://www.bitstamp.net/",
      "updated": 1552123668156
    },
    {
      "exchangeId": "gate",
      "name": "Gate",
      "rank": "20",
      "percentTotalVolume": "0.506174052332168695000000000000000000",
      "volumeUsd": "40332844.1883381896207383",
      "tradingPairs": "352",
      "socket": false,
      "exchangeUrl": "https://gate.io/",
      "updated": 1552123681386
    },
    {
      "exchangeId": "bittrex",
      "name": "Bittrex",
      "rank": "21",
      "percentTotalVolume": "0.354812182235165436000000000000000000",
      "volumeUsd": "28272062.5371450071407040",
      "tradingPairs": "263",
      "socket": false,
      "exchangeUrl": "https://bittrex.com/",
      "updated": 1552123645822
    },
    {
      "exchangeId": "bilaxy",
      "name": "Bilaxy",
      "rank": "22",
      "percentTotalVolume": "0.249739117989978261000000000000000000",
      "volumeUsd": "19899654.8464178438984933",
      "tradingPairs": "74",
      "socket": false,
      "exchangeUrl": "https://bilaxy.com/",
      "updated": 1552123681085
    },
    {
      "exchangeId": "yobit",
      "name": "YoBit",
      "rank": "23",
      "percentTotalVolume": "0.211186407608761304000000000000000000",
      "volumeUsd": "16827706.6624296478931966",
      "tradingPairs": "56",
      "socket": false,
      "exchangeUrl": "https://yobit.net",
      "updated": 1552123663933
    },
    {
      "exchangeId": "bitbank",
      "name": "Bitbank",
      "rank": "24",
      "percentTotalVolume": "0.183919962898410831000000000000000000",
      "volumeUsd": "14655068.0986677482281564",
      "tradingPairs": "6",
      "socket": false,
      "exchangeUrl": "https://www.bibank.com",
      "updated": 1552123652791
    },
    {
      "exchangeId": "zaif",
      "name": "Zaif",
      "rank": "25",
      "percentTotalVolume": "0.168110858025969488000000000000000000",
      "volumeUsd": "13395370.6474857924508516",
      "tradingPairs": "26",
      "socket": false,
      "exchangeUrl": "https://zaif.jp/",
      "updated": 1552123680658
    },
    {
      "exchangeId": "exmo",
      "name": "Exmo",
      "rank": "26",
      "percentTotalVolume": "0.166698600730997570000000000000000000",
      "volumeUsd": "13282839.4871675092622775",
      "tradingPairs": "78",
      "socket": false,
      "exchangeUrl": "https://www.exmo.com/",
      "updated": 1552123650655
    },
    {
      "exchangeId": "gemini",
      "name": "Gemini",
      "rank": "27",
      "percentTotalVolume": "0.162293833260242796000000000000000000",
      "volumeUsd": "12931859.8206570095539974",
      "tradingPairs": "6",
      "socket": true,
      "exchangeUrl": "https://gemini.com/",
      "updated": 1552123680812
    },
    {
      "exchangeId": "bitflyer",
      "name": "Bitflyer",
      "rank": "28",
      "percentTotalVolume": "0.148584097361923914000000000000000000",
      "volumeUsd": "11839443.8042641033824459",
      "tradingPairs": "4",
      "socket": false,
      "exchangeUrl": "https://bitflyer.com/",
      "updated": 1552123658539
    },
    {
      "exchangeId": "bigone",
      "name": "BigONE",
      "rank": "29",
      "percentTotalVolume": "0.142662657508647310000000000000000000",
      "volumeUsd": "11367612.9984919932154296",
      "tradingPairs": "61",
      "socket": false,
      "exchangeUrl": "https://big.one/",
      "updated": 1552123680772
    },
    {
      "exchangeId": "poloniex",
      "name": "Poloniex",
      "rank": "30",
      "percentTotalVolume": "0.132034532852470036000000000000000000",
      "volumeUsd": "10520745.2189272468804338",
      "tradingPairs": "103",
      "socket": true,
      "exchangeUrl": "https://poloniex.com/",
      "updated": 1552123643936
    },
    {
      "exchangeId": "coinone",
      "name": "Coinone",
      "rank": "31",
      "percentTotalVolume": "0.125378977109111141000000000000000000",
      "volumeUsd": "9990418.7599811928271180",
      "tradingPairs": "15",
      "socket": false,
      "exchangeUrl": "https://coinone.co.kr/",
      "updated": 1552123661437
    },
    {
      "exchangeId": "livecoin",
      "name": "Livecoin",
      "rank": "32",
      "percentTotalVolume": "0.120264488772502212000000000000000000",
      "volumeUsd": "9582887.2789953763211789",
      "tradingPairs": "363",
      "socket": false,
      "exchangeUrl": "https://www.livecoin.net",
      "updated": 1552123640630
    },
    {
      "exchangeId": "btcbox",
      "name": "BTCBOX",
      "rank": "33",
      "percentTotalVolume": "0.106306760376941497000000000000000000",
      "volumeUsd": "8470710.7815879910600907",
      "tradingPairs": "1",
      "socket": false,
      "exchangeUrl": "https://www.btcbox.co.jp",
      "updated": 1552123679776
    },
    {
      "exchangeId": "bitbay",
      "name": "BitBay",
      "rank": "34",
      "percentTotalVolume": "0.074796717400991397000000000000000000",
      "volumeUsd": "5959934.7987787529716909",
      "tradingPairs": "33",
      "socket": false,
      "exchangeUrl": "https://bitbay.net",
      "updated": 1552123681853
    },
    {
      "exchangeId": "korbit",
      "name": "Korbit",
      "rank": "35",
      "percentTotalVolume": "0.071535523698013701000000000000000000",
      "volumeUsd": "5700077.1136916626851943",
      "tradingPairs": "5",
      "socket": false,
      "exchangeUrl": "https://www.korbit.co.kr/",
      "updated": 1552123651062
    },
    {
      "exchangeId": "itbit",
      "name": "Itbit",
      "rank": "36",
      "percentTotalVolume": "0.061538376916667695000000000000000000",
      "volumeUsd": "4903486.7677381471687478",
      "tradingPairs": "3",
      "socket": false,
      "exchangeUrl": "https://www.itbit.com/",
      "updated": 1552123674310
    },
    {
      "exchangeId": "mercatox",
      "name": "Mercatox",
      "rank": "37",
      "percentTotalVolume": "0.042015114903144518000000000000000000",
      "volumeUsd": "3347838.7031811073692419",
      "tradingPairs": "130",
      "socket": false,
      "exchangeUrl": "https://mercatox.com/",
      "updated": 1552123681903
    },
    {
      "exchangeId": "raisex",
      "name": "Raisex",
      "rank": "38",
      "percentTotalVolume": "0.035069471015891806000000000000000000",
      "volumeUsd": "2794397.5076051410454002",
      "tradingPairs": "49",
      "socket": false,
      "exchangeUrl": "https://raisex.io",
      "updated": 1552123636535
    },
    {
      "exchangeId": "tidex",
      "name": "Tidex",
      "rank": "39",
      "percentTotalVolume": "0.034927415022465515000000000000000000",
      "volumeUsd": "2783078.2346742514379791",
      "tradingPairs": "224",
      "socket": false,
      "exchangeUrl": "https://tidex.com/",
      "updated": 1552123681763
    },
    {
      "exchangeId": "btcturk",
      "name": "BTCTurk",
      "rank": "40",
      "percentTotalVolume": "0.030175121341398135000000000000000000",
      "volumeUsd": "2404407.0647622622460670",
      "tradingPairs": "5",
      "socket": false,
      "exchangeUrl": "https://www.btcturk.com/",
      "updated": 1552123628342
    },
    {
      "exchangeId": "luno",
      "name": "Luno",
      "rank": "41",
      "percentTotalVolume": "0.029129456232856746000000000000000000",
      "volumeUsd": "2321086.6185606755844974",
      "tradingPairs": "5",
      "socket": true,
      "exchangeUrl": "https://www.luno.com/",
      "updated": 1552123664214
    },
    {
      "exchangeId": "mercado",
      "name": "Mercado",
      "rank": "42",
      "percentTotalVolume": "0.019167081382117921000000000000000000",
      "volumeUsd": "1527266.9615684875729104",
      "tradingPairs": "3",
      "socket": false,
      "exchangeUrl": "https://www.mercadobitcoin.com.br/",
      "updated": 1552123673822
    },
    {
      "exchangeId": "cex",
      "name": "Cex",
      "rank": "43",
      "percentTotalVolume": "0.018708750743983841000000000000000000",
      "volumeUsd": "1490746.3652845981469473",
      "tradingPairs": "15",
      "socket": false,
      "exchangeUrl": "https://www.cex.io/",
      "updated": 1552123681915
    },
    {
      "exchangeId": "bxinth",
      "name": "Bxinth",
      "rank": "44",
      "percentTotalVolume": "0.018620229047129237000000000000000000",
      "volumeUsd": "1483692.7998359664568217",
      "tradingPairs": "26",
      "socket": false,
      "exchangeUrl": "https://bx.in.th/",
      "updated": 1552123643716
    },
    {
      "exchangeId": "bitso",
      "name": "Bitso",
      "rank": "45",
      "percentTotalVolume": "0.014061037322339034000000000000000000",
      "volumeUsd": "1120408.3355030291075365",
      "tradingPairs": "11",
      "socket": true,
      "exchangeUrl": "https://www.bitso.com/",
      "updated": 1552123678278
    },
    {
      "exchangeId": "acx",
      "name": "ACX",
      "rank": "46",
      "percentTotalVolume": "0.012224034203558784000000000000000000",
      "volumeUsd": "974032.6763362219770667",
      "tradingPairs": "9",
      "socket": false,
      "exchangeUrl": "https://acx.io/",
      "updated": 1552123621371
    },
    {
      "exchangeId": "independentreserve",
      "name": "Independent Reserve",
      "rank": "47",
      "percentTotalVolume": "0.011500838674554797000000000000000000",
      "volumeUsd": "916407.1768570838432920",
      "tradingPairs": "15",
      "socket": false,
      "exchangeUrl": "https://www.independentreserve.com/",
      "updated": 1552123662220
    },
    {
      "exchangeId": "btcmarket",
      "name": "BTCMarket",
      "rank": "48",
      "percentTotalVolume": "0.010729915127577920000000000000000000",
      "volumeUsd": "854978.6244489197682664",
      "tradingPairs": "11",
      "socket": false,
      "exchangeUrl": "https://www.btcmarkets.net/",
      "updated": 1552123681804
    },
    {
      "exchangeId": "coinfloor",
      "name": "Coinfloor",
      "rank": "49",
      "percentTotalVolume": "0.0093902063514360627336000000000000000000",
      "volumeUsd": "748228.2584889917563777",
      "tradingPairs": "2",
      "socket": false,
      "exchangeUrl": "https://www.coinfloor.co.uk/",
      "updated": 1552123654032
    },
    {
      "exchangeId": "okcoin",
      "name": "OkCoin",
      "rank": "50",
      "percentTotalVolume": "0.0088347028587630782052000000000000000000",
      "volumeUsd": "703964.7572035600000000",
      "tradingPairs": "5",
      "socket": false,
      "exchangeUrl": "https://www.okcoin.com",
      "updated": 1552123670937
    },
    {
      "exchangeId": "coinex",
      "name": "CoinEx",
      "rank": "51",
      "percentTotalVolume": "0.0088042248130916687448000000000000000000",
      "volumeUsd": "701536.2125921437544344",
      "tradingPairs": "67",
      "socket": false,
      "exchangeUrl": "https://www.coinex.com/",
      "updated": 1552123673714
    },
    {
      "exchangeId": "coinmate",
      "name": "Coinmate",
      "rank": "52",
      "percentTotalVolume": "0.0086294046137177762037000000000000000000",
      "volumeUsd": "687606.2297535641087595",
      "tradingPairs": "4",
      "socket": true,
      "exchangeUrl": "https://coinmate.io/",
      "updated": 1552123681833
    },
    {
      "exchangeId": "therocktrading",
      "name": "The Rock Trading",
      "rank": "53",
      "percentTotalVolume": "0.0077110900211660696114000000000000000000",
      "volumeUsd": "614433.2980186922181434",
      "tradingPairs": "14",
      "socket": true,
      "exchangeUrl": "https://www.therocktrading.com",
      "updated": 1552123653439
    },
    {
      "exchangeId": "idex",
      "name": "IDEX",
      "rank": "54",
      "percentTotalVolume": "0.0064643964178157871466000000000000000000",
      "volumeUsd": "515094.5456214681649303",
      "tradingPairs": "280",
      "socket": false,
      "exchangeUrl": "https://idex.market",
      "updated": 1552123642928
    },
    {
      "exchangeId": "bitmarket",
      "name": "Bitmarket",
      "rank": "55",
      "percentTotalVolume": "0.0031263422932109129715000000000000000000",
      "volumeUsd": "249112.4861310359905446",
      "tradingPairs": "6",
      "socket": false,
      "exchangeUrl": "https://www.bitmarket.net/",
      "updated": 1552123667843
    },
    {
      "exchangeId": "braziliex",
      "name": "Braziliex",
      "rank": "56",
      "percentTotalVolume": "0.0026762843202718014036000000000000000000",
      "volumeUsd": "213251.0704487471785840",
      "tradingPairs": "21",
      "socket": false,
      "exchangeUrl": "https://braziliex.com",
      "updated": 1552123629298
    },
    {
      "exchangeId": "kuna",
      "name": "Kuna",
      "rank": "57",
      "percentTotalVolume": "0.0024100009537917999255000000000000000000",
      "volumeUsd": "192033.1406068276567090",
      "tradingPairs": "21",
      "socket": false,
      "exchangeUrl": "https://kuna.io/",
      "updated": 1552123680545
    },
    {
      "exchangeId": "bleutrade",
      "name": "Bleutrade",
      "rank": "58",
      "percentTotalVolume": "0.0017380601407258216293000000000000000000",
      "volumeUsd": "138491.7075912320791594",
      "tradingPairs": "81",
      "socket": false,
      "exchangeUrl": "https://bleutrade.com/",
      "updated": 1552123661991
    },
    {
      "exchangeId": "coinexchange",
      "name": "CoinExchange",
      "rank": "59",
      "percentTotalVolume": "0.0017206341692291315691000000000000000000",
      "volumeUsd": "137103.1753463093471371",
      "tradingPairs": "502",
      "socket": false,
      "exchangeUrl": "https://www.coinexchange.io",
      "updated": 1552123644305
    },
    {
      "exchangeId": "lykke",
      "name": "Lykke",
      "rank": "60",
      "percentTotalVolume": "0.0011660725075315305817000000000000000000",
      "volumeUsd": "92914.7208196098355961",
      "tradingPairs": "129",
      "socket": false,
      "exchangeUrl": "https://www.lykke.com/",
      "updated": 1552123671614
    },
    {
      "exchangeId": "tradesatoshi",
      "name": "TradeSatoshi",
      "rank": "61",
      "percentTotalVolume": "0.0008087907595494266578000000000000000000",
      "volumeUsd": "64445.8789137374028055",
      "tradingPairs": "584",
      "socket": false,
      "exchangeUrl": "https://tradesatoshi.com/",
      "updated": 1552123651367
    },
    {
      "exchangeId": "btctradeua",
      "name": "BTC Trade UA",
      "rank": "62",
      "percentTotalVolume": "0.0004723800593192487983000000000000000000",
      "volumeUsd": "37640.0790250274568571",
      "tradingPairs": "13",
      "socket": false,
      "exchangeUrl": "https://btc-trade.com.ua/",
      "updated": 1552123645715
    },
    {
      "exchangeId": "xbtce",
      "name": "xBTCe",
      "rank": "63",
      "percentTotalVolume": "0.0002367399508800682238000000000000000000",
      "volumeUsd": "18863.8582084698505678",
      "tradingPairs": "25",
      "socket": false,
      "exchangeUrl": "https://www.xbtce.com/",
      "updated": 1552123678920
    },
    {
      "exchangeId": "lakebtc",
      "name": "Lakebtc",
      "rank": "64",
      "percentTotalVolume": "0.0002250681139144977849000000000000000000",
      "volumeUsd": "17933.8255851952169625",
      "tradingPairs": "13",
      "socket": false,
      "exchangeUrl": "https://www.lakebtc.com/",
      "updated": 1552123678286
    },
    {
      "exchangeId": "ccex",
      "name": "C-CEX",
      "rank": "65",
      "percentTotalVolume": "0.0000056830070056254255000000000000000000",
      "volumeUsd": "452.8320545532587463",
      "tradingPairs": "4",
      "socket": false,
      "exchangeUrl": "https://www.c-cex.com",
      "updated": 1552123654004
    },
    {
      "exchangeId": "coinnest",
      "name": "Coinnest",
      "rank": "66",
      "percentTotalVolume": "0.00000038862285666240476153000000000000000000",
      "volumeUsd": "30.9661569050672500",
      "tradingPairs": "9",
      "socket": false,
      "exchangeUrl": "https://www.coinnest.co.kr/",
      "updated": 1552123681760
    },
    {
      "exchangeId": "kucoin",
      "name": "Kucoin",
      "rank": "69",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "0",
      "socket": null,
      "exchangeUrl": "https://www.kucoin.io/",
      "updated": 1550447990146
    },
    {
      "exchangeId": "btcc",
      "name": "BTCC",
      "rank": "71",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "0",
      "socket": null,
      "exchangeUrl": "https://exchange.btcc.com/",
      "updated": 1548243380939
    },
    {
      "exchangeId": "coinegg",
      "name": "CoinEgg",
      "rank": "72",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "0",
      "socket": null,
      "exchangeUrl": "https://www.coinegg.com",
      "updated": 1551625560621
    },
    {
      "exchangeId": "gatecoin",
      "name": "Gatecoin",
      "rank": "67",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "27",
      "socket": false,
      "exchangeUrl": "https://gatecoin.com/",
      "updated": 1552123624568
    },
    {
      "exchangeId": "wex",
      "name": "Wex",
      "rank": "73",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "0",
      "socket": null,
      "exchangeUrl": "https://wex.nz/",
      "updated": 1543419022946
    },
    {
      "exchangeId": "cryptopia",
      "name": "Cryptopia",
      "rank": "74",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "0",
      "socket": null,
      "exchangeUrl": "https://www.cryptopia.co.nz/",
      "updated": 1551758998486
    },
    {
      "exchangeId": "oasisdex",
      "name": "OasisDEX",
      "rank": "68",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "0",
      "socket": null,
      "exchangeUrl": "https://oasisdex.com/",
      "updated": 1547574701101
    },
    {
      "exchangeId": "quadrigacx",
      "name": "QuadrigaCX",
      "rank": "70",
      "percentTotalVolume": null,
      "volumeUsd": null,
      "tradingPairs": "0",
      "socket": null,
      "exchangeUrl": "https://www.quadrigacx.com",
      "updated": 1548709270317
    }
  ],
  "timestamp": 1552123707863
}

返回 JSON 在官方文档的释义:

id: unique identifier for exchange
name: proper name of exchange
rank: rank is in ascending order - this number is directly associated with the total exchange volume whereas the highest volume exchange receives rank 1
percentTotalVolume: the amount of daily volume a single exchange transacts in relation to total daily volume of all exchanges
volumeUsd: daily volume represented in USD
tradingPairs: number of trading pairs (or markets) offered by exchange
socket: true/false, true = trade socket available, false = trade socket unavailable
exchangeUrl: website to exchange
updated: UNIX timestamp (milliseconds) since information was received from this exchange

翻译:

id: 交易所唯一标识符,比如币安是 binance
name: 交易所名称;
rank: 权重,按升序排列,权重与总交易量直接相关,交易量最高的排在第1;
percentTotalVolume: 单个交易所每日交易量在所有交易所每日交易量中所占的比例;
volumeUsd: 以美元 USD 为单位的每日交易量;
tradingPairs: 交易所提供的交易对数量;
socket: true/false, true 代表交易 socket 可用, false 代表交易 socket 不可用;
exchangeUrl: 交易所官网;
updated: 从交易所收到信息的时间的 UNIX 时间戳。

查询指定交易所语句:

api.coincap.io/v2/exchanges//这里放要查询的交易所ID,比如bibox/

查询指定交易所 Node.js 代码示例:

const fetch = require('node-fetch');

fetch('https://api.coincap.io/v2/exchanges//*这里放要查询的交易所ID,比如bibox*/', {
    method: 'get',
}).then(response => response.json()
    .then(data => console.log(data.data)));

CoinCap API 官方文档:https://docs.coincap.io/

CoinCap API 思维导图:

COINCAP API

原创内容,欢迎转载,但转载请标明出处。

我们有一个区块链知识星球,做区块链前沿资料的归纳整理以方便大家检索查询使用,也是国内顶尖区块链技术社区,欢迎感兴趣的朋友加入。如果你对上面内容有疑问,也可以加入知识星球提问我:

区块链社群 知识星球

相关文章

网友评论

    本文标题:CoinCap API 查询主流交易所交易基本数据 - 区块链数

    本文链接:https://www.haomeiwen.com/subject/jqhepqtx.html