• 语言&汇率
  • 偏好设置
    涨跌颜色
    涨跌幅起始时间

API文档


API (4.0) 支持现货,杠杆,永续合约,交割合约


REST API (现货,杠杆,合约)


合约 WebSocket API


现货 WebSocket API

API Keys


API V4 Keys 独立于原先 API 2.0 的 API Keys,生成入口详见 APIv4 Keys

API (2.0) 只支持现货交易


REST API

示例程序: PHP, JAVA, NODEJS, PYTHON, GO, CSHARP, PERL


现货 WebSocket API

WS API Reference


示例程序: NODEJS, PHP, PYTHON


所有交易对 API

返回所有系统支持的交易对

URL: https://data.gateapi.io/api2/1/pairs

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/pairs
    # Response
        [
                "eth_btc","etc_btc","etc_eth","zec_btc","dash_btc","ltc_btc","bcc_btc","qtum_btc",
                "qtum_eth","xrp_btc","zrx_btc","zrx_eth","dnt_eth","dpy_eth","oax_eth","lrc_eth",
                "lrc_btc","pst_eth","tnt_eth","snt_eth","snt_btc","omg_eth","omg_btc","pay_eth",
                "pay_btc","bat_eth","cvc_eth","storj_eth","storj_btc","eos_eth","eos_btc"
        ]
            

返回值说明

    eth_btc: 以太币对比特币交易
   etc_btc: 以太经典对比特币
    etc_eth: 以太经典对以太币
   xrp_btc: 瑞波币对比特币
    zec_btc: ZCash对比特币
    ……
    

所有市场订单参数 API

返回所有系统支持的交易市场的参数信息,包括交易费,最小下单量,价格精度等。

URL: https://data.gateapi.io/api2/1/marketinfo

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/marketinfo
    # Response
   {
        "result": "true",
        "pairs": [
                      {
                            "eth_btc": {
                                "decimal_places": 6,
                                "amount_decimal_places": 4,
                                "min_amount": 0.001,
                                "min_amount_a": 0.001,
                                "min_amount_b": 0.0001,
                                "fee": 0.2,
                                "trade_disabled ": 0,
                                "buy_disabled" : 0,
                                "sell_disabled" : 0,
                            }
                      },
                      {
                            "zec_btc": {
                                "decimal_places": 4,
                                "amount_decimal_places": 5,
                                "min_amount": 0.0001,
                                "min_amount_a": 0.0001,
                                "min_amount_b": 0.0001,
                                "fee": 0.2,
                                "trade_disabled ": 0,
                                "buy_disabled" : 0,
                                "sell_disabled" : 0,
                            }
                      }
            ]
    }
            

返回值说明

    decimal_places: 价格精度
    amount_decimal_places: 数量精度
    min_amount : 最小下单量
    min_amount_a : 币种a [CURR_A]的最小下单量
    min_amount_b : 币种b [CURR_B]的最小下单量
    fee : 交易费
    trade_disabled : 0表示未暂停交易,1表示已经暂停交易
    buy_disabled: 0表示可买,1表示不可买
    sell_disabled: 0表示可卖,1表示不可卖			

币种状态

返回所有系统支持的币种状态信息,包括充值、提现、交易状态等。

URL: https://data.gateapi.io/api2/1/coininfo

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/coininfo
    # Response
   {
        "result": "true",
        "pairs": [
                      {
                            "USDT": {
                                "delisted": 0,
                                "withdraw_disabled": 0,
								"withdraw_delayed ": 0,
                                "deposit_disabled": 0,
                                "trade_disabled": 0,
                            }
                      }
            ]
    }
            

返回值说明

    delisted : 0表示未下架,1表示已经下架
    withdraw_disabled : 0表示未暂停提现,1表示已经暂停提现
    withdraw_delayed : 0表示未提现没有延迟,1表示提现存在延迟
    deposit_disabled : 0表示未暂停充值,1表示已经暂停充值
    trade_disabled : 0表示未暂停交易,1表示已经暂停交易			

交易市场详细行情 API

返回所有系统支持的交易市场的详细行情和币种信息,包括币种名,市值,供应量,最新价格,涨跌趋势,价格曲线等。

URL: https://data.gateapi.io/api2/1/marketlist

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/marketlist
    # Response
       {
        "result": "true",
        "data": [
                {
                    "no": 1,
                    "symbol": "LTC",
                    "name": "Litecoin",
                    "name_en": "Litecoin",
                    "name_cn": "莱特币",
                    "pair": "ltc_btc",
                    "rate": "418.00",
                    "vol_a": 168120.2,
                    "vol_b": "65,616,561",
                    "curr_a": "LTC",
                    "curr_b": "BTC",
                    "curr_suffix": " BTC",
                    "rate_percent": "19.73",
                    "trend": "up",
                    "supply": 25760300,
                    "marketcap": "10,767,805,404",
                    "plot": null
                },
                {
                    "no": 2,
                    "symbol": "ETH",
                    "name": "ETH",
                    "name_en": "ETH",
                    "name_cn": "以太币",
                    "pair": "etc_eth",
                    "rate": "0.7450",
                    "vol_a": 65227328.3,
                    "vol_b": "51,041,999",
                    "curr_a": "etc",
                    "curr_b": "eth",
                    "curr_suffix": " eth",
                    "rate_percent": "-1.84",
                    "trend": "up",
                    "supply": 1050000000,
                    "marketcap": "782,250,000",
                    "plot": null
                }
            ]
    }
            

返回值说明

    symbol : 币种标识
    name: 币种名称
    name_en: 英文名称
    name_cn: 中文名称
    pair: 交易对
    rate: 当前价格
    vol_a: 被兑换货币交易量
    vol_b: 兑换货币交易量
    curr_a: 被兑换货币
    curr_b: 兑换货币
    curr_suffix: 货币类型后缀
    rate_percent: 涨跌百分百
    trend: 24小时趋势 up涨 down跌
    supply: 币种供应量
    marketcap: 总市值
    plot: 趋势数据

所有交易行情 API

返回系统支持的所有交易对的 最新,最高,最低 交易行情和交易量,每20秒钟更新:

URL: https://data.gateapi.io/api2/1/tickers

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/tickers
    # Response
      {
          "eth_btc": {
                "result": "true",
                "last": 0.1,
                "lowestAsk": 0.1,
                "highestBid": "0.00000000",
                "percentChange": 0,
                "baseVolume": 0.001,
                "quoteVolume": 0.01,
                "high24hr": 0.1,
                "low24hr": 0.1
            },
        "xrp_btc": {
                "result": "true",
                "last": "0.00004720",
                "lowestAsk": "0.00005620",
                "highestBid": "0.00004550",
                "percentChange": -7.4510907045863,
                "baseVolume": 0.5324,
                "quoteVolume": 11417.333,
                "high24hr": "0.00005580",
                "low24hr": "0.00004560"
            }
        }
            

返回值说明

    baseVolume: 交易量
    high24hr:24小时最高价
    highestBid:买方最高价
    last:最新成交价
    low24hr:24小时最低价 
    lowestAsk:卖方最低价 
    percentChange:涨跌百分比 
    quoteVolume: 兑换货币交易量

单项交易行情 API

返回系统支持的所有交易对的 最新,最高,最低 交易行情和交易量,每20秒钟更新:

URL: https://data.gateapi.io/api2/1/ticker/[CURR_A]_[CURR_B]

请替换 [CURR_A] and [CURR_B] 为您需要查看的币种.

支持的兑换类型:

  1. https://data.gateapi.io/api2/1/ticker/usdt_cny
  2. https://data.gateapi.io/api2/1/ticker/xtz_try
  3. https://data.gateapi.io/api2/1/ticker/xrp_try
  4. https://data.gateapi.io/api2/1/ticker/xlm_try
  5. https://data.gateapi.io/api2/1/ticker/wbtc_try
  6. https://data.gateapi.io/api2/1/ticker/waves_try
  7. https://data.gateapi.io/api2/1/ticker/usdt_try
  8. https://data.gateapi.io/api2/1/ticker/uni_try
  9. https://data.gateapi.io/api2/1/ticker/uma_try
  10. https://data.gateapi.io/api2/1/ticker/trx_try
  11. https://data.gateapi.io/api2/1/ticker/sxp_try
  12. https://data.gateapi.io/api2/1/ticker/sol_try
  13. https://data.gateapi.io/api2/1/ticker/shib_try
  14. https://data.gateapi.io/api2/1/ticker/sand_try
  15. https://data.gateapi.io/api2/1/ticker/omg_try
  16. https://data.gateapi.io/api2/1/ticker/neo_try
  17. https://data.gateapi.io/api2/1/ticker/mkr_try
  18. https://data.gateapi.io/api2/1/ticker/mana_try
  19. https://data.gateapi.io/api2/1/ticker/ltc_try
  20. https://data.gateapi.io/api2/1/ticker/lrc_try
  21. https://data.gateapi.io/api2/1/ticker/link_try
  22. https://data.gateapi.io/api2/1/ticker/hot_try
  23. https://data.gateapi.io/api2/1/ticker/gst_try
  24. https://data.gateapi.io/api2/1/ticker/gala_try
  25. https://data.gateapi.io/api2/1/ticker/ftm_try
  26. https://data.gateapi.io/api2/1/ticker/eth_try
  27. https://data.gateapi.io/api2/1/ticker/eos_try
  28. https://data.gateapi.io/api2/1/ticker/enj_try
  29. https://data.gateapi.io/api2/1/ticker/dot_try
  30. https://data.gateapi.io/api2/1/ticker/doge_try
  31. https://data.gateapi.io/api2/1/ticker/dai_try
  32. https://data.gateapi.io/api2/1/ticker/crv_try
  33. https://data.gateapi.io/api2/1/ticker/chz_try
  34. https://data.gateapi.io/api2/1/ticker/btt_try
  35. https://data.gateapi.io/api2/1/ticker/btc_try
  36. https://data.gateapi.io/api2/1/ticker/bnb_try
  37. https://data.gateapi.io/api2/1/ticker/bat_try
  38. https://data.gateapi.io/api2/1/ticker/axs_try
  39. https://data.gateapi.io/api2/1/ticker/avax_try
  40. https://data.gateapi.io/api2/1/ticker/atom_try
  41. https://data.gateapi.io/api2/1/ticker/ape_try
  42. https://data.gateapi.io/api2/1/ticker/ankr_try
  43. https://data.gateapi.io/api2/1/ticker/amp_try
  44. https://data.gateapi.io/api2/1/ticker/algo_try
  45. https://data.gateapi.io/api2/1/ticker/ada_try
  46. https://data.gateapi.io/api2/1/ticker/aave_try
  47. https://data.gateapi.io/api2/1/ticker/1inch_try
  48. https://data.gateapi.io/api2/1/ticker/mask_try
  49. https://data.gateapi.io/api2/1/ticker/apt_try
  50. https://data.gateapi.io/api2/1/ticker/ar_try
  51. https://data.gateapi.io/api2/1/ticker/luna_try
  52. https://data.gateapi.io/api2/1/ticker/lunc_try
  53. https://data.gateapi.io/api2/1/ticker/flow_try
  54. https://data.gateapi.io/api2/1/ticker/fil_try
  55. https://data.gateapi.io/api2/1/ticker/dydx_try
  56. https://data.gateapi.io/api2/1/ticker/op_try
  57. https://data.gateapi.io/api2/1/ticker/icp_try
  58. https://data.gateapi.io/api2/1/ticker/lit_try
  59. https://data.gateapi.io/api2/1/ticker/people_try
  60. https://data.gateapi.io/api2/1/ticker/jasmy_try
  61. https://data.gateapi.io/api2/1/ticker/vinu_try
  62. https://data.gateapi.io/api2/1/ticker/arb_try
  63. https://data.gateapi.io/api2/1/ticker/id_try
  64. https://data.gateapi.io/api2/1/ticker/sui_try
  65. https://data.gateapi.io/api2/1/ticker/pepe_try
  66. https://data.gateapi.io/api2/1/ticker/aidoge_try
  67. https://data.gateapi.io/api2/1/ticker/blur_try
  68. https://data.gateapi.io/api2/1/ticker/ordi_try
  69. https://data.gateapi.io/api2/1/ticker/asr_try
  70. https://data.gateapi.io/api2/1/ticker/psg_try
  71. https://data.gateapi.io/api2/1/ticker/acm_try
  72. https://data.gateapi.io/api2/1/ticker/atm_try
  73. https://data.gateapi.io/api2/1/ticker/juv_try
  74. https://data.gateapi.io/api2/1/ticker/sei_try
  75. https://data.gateapi.io/api2/1/ticker/lpt_try
  76. https://data.gateapi.io/api2/1/ticker/cyber_try
  77. https://data.gateapi.io/api2/1/ticker/wld_try
  78. https://data.gateapi.io/api2/1/ticker/hbar_try
  79. https://data.gateapi.io/api2/1/ticker/arkm_try
  80. https://data.gateapi.io/api2/1/ticker/ygg_try
  81. https://data.gateapi.io/api2/1/ticker/flm_try
  82. https://data.gateapi.io/api2/1/ticker/blz_try
  83. https://data.gateapi.io/api2/1/ticker/oax_try
  84. https://data.gateapi.io/api2/1/ticker/unfi_try
  85. https://data.gateapi.io/api2/1/ticker/vgx_try
  86. https://data.gateapi.io/api2/1/ticker/bch_try
  87. https://data.gateapi.io/api2/1/ticker/syn_try
  88. https://data.gateapi.io/api2/1/ticker/dodo_try
  89. https://data.gateapi.io/api2/1/ticker/cfx_try
  90. https://data.gateapi.io/api2/1/ticker/astra_try
  91. https://data.gateapi.io/api2/1/ticker/kas_try
  92. https://data.gateapi.io/api2/1/ticker/lqty_try
  93. https://data.gateapi.io/api2/1/ticker/perp_try
  94. https://data.gateapi.io/api2/1/ticker/snx_try
  95. https://data.gateapi.io/api2/1/ticker/nmr_try
  96. https://data.gateapi.io/api2/1/ticker/matic_try
  97. https://data.gateapi.io/api2/1/ticker/flux_try
  98. https://data.gateapi.io/api2/1/ticker/og_try
  99. https://data.gateapi.io/api2/1/ticker/ftt_try
  100. https://data.gateapi.io/api2/1/ticker/xvg_try
  101. https://data.gateapi.io/api2/1/ticker/ogn_try
  102. https://data.gateapi.io/api2/1/ticker/storj_try
  103. https://data.gateapi.io/api2/1/ticker/hifi_try
  104. https://data.gateapi.io/api2/1/ticker/trb_try
  105. https://data.gateapi.io/api2/1/ticker/srm_try
  106. https://data.gateapi.io/api2/1/ticker/ladys_try
  107. https://data.gateapi.io/api2/1/ticker/akro_try
  108. https://data.gateapi.io/api2/1/ticker/loom_try
  109. https://data.gateapi.io/api2/1/ticker/gari_try
  110. https://data.gateapi.io/api2/1/ticker/fitfi_try
  111. https://data.gateapi.io/api2/1/ticker/bsv_try
  112. https://data.gateapi.io/api2/1/ticker/vra_try
  113. https://data.gateapi.io/api2/1/ticker/etc_try
  114. https://data.gateapi.io/api2/1/ticker/bigtime_try
  115. https://data.gateapi.io/api2/1/ticker/bnt_try
  116. https://data.gateapi.io/api2/1/ticker/flr_try
  117. https://data.gateapi.io/api2/1/ticker/rndr_try
  118. https://data.gateapi.io/api2/1/ticker/btc_usdt
  119. https://data.gateapi.io/api2/1/ticker/eth_usdt
  120. https://data.gateapi.io/api2/1/ticker/xrp_usdt
  121. https://data.gateapi.io/api2/1/ticker/mana_usdt
  122. https://data.gateapi.io/api2/1/ticker/avax_usdt
  123. https://data.gateapi.io/api2/1/ticker/sxp_usdt
  124. https://data.gateapi.io/api2/1/ticker/ada_usdt
  125. https://data.gateapi.io/api2/1/ticker/link_usdt
  126. https://data.gateapi.io/api2/1/ticker/chz_usdt
  127. https://data.gateapi.io/api2/1/ticker/gt_usdt
  128. https://data.gateapi.io/api2/1/ticker/strax_try
  129. https://data.gateapi.io/api2/1/ticker/orbs_try
  130. https://data.gateapi.io/api2/1/ticker/bnx_try
  131. https://data.gateapi.io/api2/1/ticker/fdusd_try
  132. https://data.gateapi.io/api2/1/ticker/mina_try
  133. https://data.gateapi.io/api2/1/ticker/polyx_try
  134. https://data.gateapi.io/api2/1/ticker/inj_try
  135. https://data.gateapi.io/api2/1/ticker/gas_try
  136. https://data.gateapi.io/api2/1/ticker/starl_try
  137. https://data.gateapi.io/api2/1/ticker/slp_try
  138. https://data.gateapi.io/api2/1/ticker/floki_try
  139. https://data.gateapi.io/api2/1/ticker/raca_try
  140. https://data.gateapi.io/api2/1/ticker/tia_try
  141. https://data.gateapi.io/api2/1/ticker/sushi_try
  142. https://data.gateapi.io/api2/1/ticker/meme_try
  143. https://data.gateapi.io/api2/1/ticker/vmpx_try
  144. https://data.gateapi.io/api2/1/ticker/ark_try
  145. https://data.gateapi.io/api2/1/ticker/rune_try
  146. https://data.gateapi.io/api2/1/ticker/near_try
  147. https://data.gateapi.io/api2/1/ticker/cake_try
  148. https://data.gateapi.io/api2/1/ticker/flip_try
  149. https://data.gateapi.io/api2/1/ticker/magic_try
  150. https://data.gateapi.io/api2/1/ticker/ntrn_try
  151. https://data.gateapi.io/api2/1/ticker/ustc_try
  152. https://data.gateapi.io/api2/1/ticker/ethw_try
  153. https://data.gateapi.io/api2/1/ticker/super_try
  154. https://data.gateapi.io/api2/1/ticker/sats_try
  155. https://data.gateapi.io/api2/1/ticker/token_try
  156. https://data.gateapi.io/api2/1/ticker/jto_try
  157. https://data.gateapi.io/api2/1/ticker/bonk_try
  158. https://data.gateapi.io/api2/1/ticker/ace_try
  159. https://data.gateapi.io/api2/1/ticker/nfp_try
  160. https://data.gateapi.io/api2/1/ticker/alt_try
  161. https://data.gateapi.io/api2/1/ticker/pivx_try
  162. https://data.gateapi.io/api2/1/ticker/jup_try
  163. https://data.gateapi.io/api2/1/ticker/dym_try
  164. https://data.gateapi.io/api2/1/ticker/ens_try
  165. https://data.gateapi.io/api2/1/ticker/strk_try
  166. https://data.gateapi.io/api2/1/ticker/zk_try
  167. https://data.gateapi.io/api2/1/ticker/zkj_try
  168. https://data.gateapi.io/api2/1/ticker/venom_try
  169. https://data.gateapi.io/api2/1/ticker/ethfi_try
  170. https://data.gateapi.io/api2/1/ticker/bome_try
  171. https://data.gateapi.io/api2/1/ticker/zk_usdt
  172. https://data.gateapi.io/api2/1/ticker/venom_usdt
  173. https://data.gateapi.io/api2/1/ticker/ethfi_usdt
  174. https://data.gateapi.io/api2/1/ticker/zkj_usdt
  175. https://data.gateapi.io/api2/1/ticker/wen_usdt

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/ticker/eth_btc
    # Response
        {
            "result": "true",
            "last": 0.1,
            "lowestAsk": 0.1,
            "highestBid": "0.00000000",
            "percentChange": 0,
            "baseVolume": 0.001,
            "quoteVolume": 0.01,
            "high24hr": 0.1,
            "low24hr": 0.1
        }
            

返回值说明

   baseVolume: 交易量
   high24hr:24小时最高价
   highestBid:买方最高价
   last:最新成交价
   low24hr:24小时最低价 
   lowestAsk:卖方最低价 
   percentChange:涨跌百分比 
   quoteVolume: 兑换货币交易量                

市场深度 API

返回系统支持的所有交易对的市场深度(委托挂单),其中 asks 是委卖单, bids 是委买单。

URL: https://data.gateapi.io/api2/1/orderBooks


当前市场深度 API

返回当前市场深度(委托挂单),其中 asks 是委卖单, bids 是委买单。

URL: https://data.gateapi.io/api2/1/orderBook/[CURR_A]_[CURR_B]

请替换 [CURR_A] and [CURR_B] 为您需要查看的币种.

支持的兑换类型:

  1. https://data.gateapi.io/api2/1/orderBook/xtz_try
  2. https://data.gateapi.io/api2/1/orderBook/xrp_try
  3. https://data.gateapi.io/api2/1/orderBook/xlm_try
  4. https://data.gateapi.io/api2/1/orderBook/wbtc_try
  5. https://data.gateapi.io/api2/1/orderBook/waves_try
  6. https://data.gateapi.io/api2/1/orderBook/usdt_try
  7. https://data.gateapi.io/api2/1/orderBook/uni_try
  8. https://data.gateapi.io/api2/1/orderBook/uma_try
  9. https://data.gateapi.io/api2/1/orderBook/trx_try
  10. https://data.gateapi.io/api2/1/orderBook/sxp_try
  11. https://data.gateapi.io/api2/1/orderBook/sol_try
  12. https://data.gateapi.io/api2/1/orderBook/shib_try
  13. https://data.gateapi.io/api2/1/orderBook/sand_try
  14. https://data.gateapi.io/api2/1/orderBook/omg_try
  15. https://data.gateapi.io/api2/1/orderBook/neo_try
  16. https://data.gateapi.io/api2/1/orderBook/mkr_try
  17. https://data.gateapi.io/api2/1/orderBook/mana_try
  18. https://data.gateapi.io/api2/1/orderBook/ltc_try
  19. https://data.gateapi.io/api2/1/orderBook/lrc_try
  20. https://data.gateapi.io/api2/1/orderBook/link_try
  21. https://data.gateapi.io/api2/1/orderBook/hot_try
  22. https://data.gateapi.io/api2/1/orderBook/gst_try
  23. https://data.gateapi.io/api2/1/orderBook/gala_try
  24. https://data.gateapi.io/api2/1/orderBook/ftm_try
  25. https://data.gateapi.io/api2/1/orderBook/eth_try
  26. https://data.gateapi.io/api2/1/orderBook/eos_try
  27. https://data.gateapi.io/api2/1/orderBook/enj_try
  28. https://data.gateapi.io/api2/1/orderBook/dot_try
  29. https://data.gateapi.io/api2/1/orderBook/doge_try
  30. https://data.gateapi.io/api2/1/orderBook/dai_try
  31. https://data.gateapi.io/api2/1/orderBook/crv_try
  32. https://data.gateapi.io/api2/1/orderBook/chz_try
  33. https://data.gateapi.io/api2/1/orderBook/btt_try
  34. https://data.gateapi.io/api2/1/orderBook/btc_try
  35. https://data.gateapi.io/api2/1/orderBook/bnb_try
  36. https://data.gateapi.io/api2/1/orderBook/bat_try
  37. https://data.gateapi.io/api2/1/orderBook/axs_try
  38. https://data.gateapi.io/api2/1/orderBook/avax_try
  39. https://data.gateapi.io/api2/1/orderBook/atom_try
  40. https://data.gateapi.io/api2/1/orderBook/ape_try
  41. https://data.gateapi.io/api2/1/orderBook/ankr_try
  42. https://data.gateapi.io/api2/1/orderBook/amp_try
  43. https://data.gateapi.io/api2/1/orderBook/algo_try
  44. https://data.gateapi.io/api2/1/orderBook/ada_try
  45. https://data.gateapi.io/api2/1/orderBook/aave_try
  46. https://data.gateapi.io/api2/1/orderBook/1inch_try
  47. https://data.gateapi.io/api2/1/orderBook/mask_try
  48. https://data.gateapi.io/api2/1/orderBook/apt_try
  49. https://data.gateapi.io/api2/1/orderBook/ar_try
  50. https://data.gateapi.io/api2/1/orderBook/luna_try
  51. https://data.gateapi.io/api2/1/orderBook/lunc_try
  52. https://data.gateapi.io/api2/1/orderBook/flow_try
  53. https://data.gateapi.io/api2/1/orderBook/fil_try
  54. https://data.gateapi.io/api2/1/orderBook/dydx_try
  55. https://data.gateapi.io/api2/1/orderBook/op_try
  56. https://data.gateapi.io/api2/1/orderBook/icp_try
  57. https://data.gateapi.io/api2/1/orderBook/lit_try
  58. https://data.gateapi.io/api2/1/orderBook/people_try
  59. https://data.gateapi.io/api2/1/orderBook/jasmy_try
  60. https://data.gateapi.io/api2/1/orderBook/vinu_try
  61. https://data.gateapi.io/api2/1/orderBook/arb_try
  62. https://data.gateapi.io/api2/1/orderBook/id_try
  63. https://data.gateapi.io/api2/1/orderBook/sui_try
  64. https://data.gateapi.io/api2/1/orderBook/pepe_try
  65. https://data.gateapi.io/api2/1/orderBook/aidoge_try
  66. https://data.gateapi.io/api2/1/orderBook/blur_try
  67. https://data.gateapi.io/api2/1/orderBook/ordi_try
  68. https://data.gateapi.io/api2/1/orderBook/asr_try
  69. https://data.gateapi.io/api2/1/orderBook/psg_try
  70. https://data.gateapi.io/api2/1/orderBook/acm_try
  71. https://data.gateapi.io/api2/1/orderBook/atm_try
  72. https://data.gateapi.io/api2/1/orderBook/juv_try
  73. https://data.gateapi.io/api2/1/orderBook/sei_try
  74. https://data.gateapi.io/api2/1/orderBook/lpt_try
  75. https://data.gateapi.io/api2/1/orderBook/cyber_try
  76. https://data.gateapi.io/api2/1/orderBook/wld_try
  77. https://data.gateapi.io/api2/1/orderBook/hbar_try
  78. https://data.gateapi.io/api2/1/orderBook/arkm_try
  79. https://data.gateapi.io/api2/1/orderBook/ygg_try
  80. https://data.gateapi.io/api2/1/orderBook/flm_try
  81. https://data.gateapi.io/api2/1/orderBook/blz_try
  82. https://data.gateapi.io/api2/1/orderBook/oax_try
  83. https://data.gateapi.io/api2/1/orderBook/unfi_try
  84. https://data.gateapi.io/api2/1/orderBook/vgx_try
  85. https://data.gateapi.io/api2/1/orderBook/bch_try
  86. https://data.gateapi.io/api2/1/orderBook/syn_try
  87. https://data.gateapi.io/api2/1/orderBook/dodo_try
  88. https://data.gateapi.io/api2/1/orderBook/cfx_try
  89. https://data.gateapi.io/api2/1/orderBook/astra_try
  90. https://data.gateapi.io/api2/1/orderBook/kas_try
  91. https://data.gateapi.io/api2/1/orderBook/lqty_try
  92. https://data.gateapi.io/api2/1/orderBook/perp_try
  93. https://data.gateapi.io/api2/1/orderBook/snx_try
  94. https://data.gateapi.io/api2/1/orderBook/nmr_try
  95. https://data.gateapi.io/api2/1/orderBook/matic_try
  96. https://data.gateapi.io/api2/1/orderBook/flux_try
  97. https://data.gateapi.io/api2/1/orderBook/og_try
  98. https://data.gateapi.io/api2/1/orderBook/ftt_try
  99. https://data.gateapi.io/api2/1/orderBook/xvg_try
  100. https://data.gateapi.io/api2/1/orderBook/ogn_try
  101. https://data.gateapi.io/api2/1/orderBook/storj_try
  102. https://data.gateapi.io/api2/1/orderBook/hifi_try
  103. https://data.gateapi.io/api2/1/orderBook/trb_try
  104. https://data.gateapi.io/api2/1/orderBook/srm_try
  105. https://data.gateapi.io/api2/1/orderBook/ladys_try
  106. https://data.gateapi.io/api2/1/orderBook/akro_try
  107. https://data.gateapi.io/api2/1/orderBook/loom_try
  108. https://data.gateapi.io/api2/1/orderBook/gari_try
  109. https://data.gateapi.io/api2/1/orderBook/fitfi_try
  110. https://data.gateapi.io/api2/1/orderBook/bsv_try
  111. https://data.gateapi.io/api2/1/orderBook/vra_try
  112. https://data.gateapi.io/api2/1/orderBook/etc_try
  113. https://data.gateapi.io/api2/1/orderBook/bigtime_try
  114. https://data.gateapi.io/api2/1/orderBook/bnt_try
  115. https://data.gateapi.io/api2/1/orderBook/flr_try
  116. https://data.gateapi.io/api2/1/orderBook/rndr_try
  117. https://data.gateapi.io/api2/1/orderBook/btc_usdt
  118. https://data.gateapi.io/api2/1/orderBook/eth_usdt
  119. https://data.gateapi.io/api2/1/orderBook/xrp_usdt
  120. https://data.gateapi.io/api2/1/orderBook/mana_usdt
  121. https://data.gateapi.io/api2/1/orderBook/avax_usdt
  122. https://data.gateapi.io/api2/1/orderBook/sxp_usdt
  123. https://data.gateapi.io/api2/1/orderBook/ada_usdt
  124. https://data.gateapi.io/api2/1/orderBook/link_usdt
  125. https://data.gateapi.io/api2/1/orderBook/chz_usdt
  126. https://data.gateapi.io/api2/1/orderBook/gt_usdt
  127. https://data.gateapi.io/api2/1/orderBook/strax_try
  128. https://data.gateapi.io/api2/1/orderBook/orbs_try
  129. https://data.gateapi.io/api2/1/orderBook/bnx_try
  130. https://data.gateapi.io/api2/1/orderBook/fdusd_try
  131. https://data.gateapi.io/api2/1/orderBook/mina_try
  132. https://data.gateapi.io/api2/1/orderBook/polyx_try
  133. https://data.gateapi.io/api2/1/orderBook/inj_try
  134. https://data.gateapi.io/api2/1/orderBook/gas_try
  135. https://data.gateapi.io/api2/1/orderBook/starl_try
  136. https://data.gateapi.io/api2/1/orderBook/slp_try
  137. https://data.gateapi.io/api2/1/orderBook/floki_try
  138. https://data.gateapi.io/api2/1/orderBook/raca_try
  139. https://data.gateapi.io/api2/1/orderBook/tia_try
  140. https://data.gateapi.io/api2/1/orderBook/sushi_try
  141. https://data.gateapi.io/api2/1/orderBook/meme_try
  142. https://data.gateapi.io/api2/1/orderBook/vmpx_try
  143. https://data.gateapi.io/api2/1/orderBook/ark_try
  144. https://data.gateapi.io/api2/1/orderBook/rune_try
  145. https://data.gateapi.io/api2/1/orderBook/near_try
  146. https://data.gateapi.io/api2/1/orderBook/cake_try
  147. https://data.gateapi.io/api2/1/orderBook/flip_try
  148. https://data.gateapi.io/api2/1/orderBook/magic_try
  149. https://data.gateapi.io/api2/1/orderBook/ntrn_try
  150. https://data.gateapi.io/api2/1/orderBook/ustc_try
  151. https://data.gateapi.io/api2/1/orderBook/ethw_try
  152. https://data.gateapi.io/api2/1/orderBook/super_try
  153. https://data.gateapi.io/api2/1/orderBook/sats_try
  154. https://data.gateapi.io/api2/1/orderBook/token_try
  155. https://data.gateapi.io/api2/1/orderBook/jto_try
  156. https://data.gateapi.io/api2/1/orderBook/bonk_try
  157. https://data.gateapi.io/api2/1/orderBook/ace_try
  158. https://data.gateapi.io/api2/1/orderBook/nfp_try
  159. https://data.gateapi.io/api2/1/orderBook/alt_try
  160. https://data.gateapi.io/api2/1/orderBook/pivx_try
  161. https://data.gateapi.io/api2/1/orderBook/jup_try
  162. https://data.gateapi.io/api2/1/orderBook/dym_try
  163. https://data.gateapi.io/api2/1/orderBook/ens_try
  164. https://data.gateapi.io/api2/1/orderBook/strk_try
  165. https://data.gateapi.io/api2/1/orderBook/zk_try
  166. https://data.gateapi.io/api2/1/orderBook/zkj_try
  167. https://data.gateapi.io/api2/1/orderBook/venom_try
  168. https://data.gateapi.io/api2/1/orderBook/ethfi_try
  169. https://data.gateapi.io/api2/1/orderBook/bome_try
  170. https://data.gateapi.io/api2/1/orderBook/zk_usdt
  171. https://data.gateapi.io/api2/1/orderBook/venom_usdt
  172. https://data.gateapi.io/api2/1/orderBook/ethfi_usdt
  173. https://data.gateapi.io/api2/1/orderBook/zkj_usdt
  174. https://data.gateapi.io/api2/1/orderBook/wen_usdt

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/orderBook/eth_btc
    # Response
      {
        "result": "true",
        "asks": [
                [29500,    4.07172355],
                [29499,    0.00203397],
                [29495,    1],
                [29488,    0.0672],
                [29475,    0.001]
            ],
        "bids": [
                [28001, 0.0477],
                [28000, 0.35714018],
                [28000, 2.56222976],
                [27800, 0.0015],
                [27777, 0.1]
            ]
        }
            

返回值说明

    asks :卖方深度
    bids :买方深度

历史成交记录 API

返回最新80条历史成交记录:

URL: https://data.gateapi.io/api2/1/tradeHistory/[CURR_A]_[CURR_B]

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/tradeHistory/eth_btc
    # Response
    {
        "result": "true",
        "data": [
            {
                "tradeID": "27734287",
                "date": "2017-09-29 11:52:05",
                "timestamp": "1506657125",
                "type": "buy",
                "rate": 0.1,
                "amount": 0.01,
                "total": 0.001,
                "fee": "0.002",
                "fee_coin": "eth"
                "gt_fee":"0",
                "point_fee":"0.1213",
            }
        ],
        "elapsed": "6.901ms"
    }
            

返回从[TID]往后的最多1000历史成交记录:

URL: https://data.gateapi.io/api2/1/tradeHistory/[CURR_A]_[CURR_B]/[TID]

请替换 [CURR_A] and [CURR_B] 为您需要查看的币种.

支持的兑换类型:

  1. https://data.gateapi.io/api2/1/tradeHistory/xtz_try
  2. https://data.gateapi.io/api2/1/tradeHistory/xrp_try
  3. https://data.gateapi.io/api2/1/tradeHistory/xlm_try
  4. https://data.gateapi.io/api2/1/tradeHistory/wbtc_try
  5. https://data.gateapi.io/api2/1/tradeHistory/waves_try
  6. https://data.gateapi.io/api2/1/tradeHistory/usdt_try
  7. https://data.gateapi.io/api2/1/tradeHistory/uni_try
  8. https://data.gateapi.io/api2/1/tradeHistory/uma_try
  9. https://data.gateapi.io/api2/1/tradeHistory/trx_try
  10. https://data.gateapi.io/api2/1/tradeHistory/sxp_try
  11. https://data.gateapi.io/api2/1/tradeHistory/sol_try
  12. https://data.gateapi.io/api2/1/tradeHistory/shib_try
  13. https://data.gateapi.io/api2/1/tradeHistory/sand_try
  14. https://data.gateapi.io/api2/1/tradeHistory/omg_try
  15. https://data.gateapi.io/api2/1/tradeHistory/neo_try
  16. https://data.gateapi.io/api2/1/tradeHistory/mkr_try
  17. https://data.gateapi.io/api2/1/tradeHistory/mana_try
  18. https://data.gateapi.io/api2/1/tradeHistory/ltc_try
  19. https://data.gateapi.io/api2/1/tradeHistory/lrc_try
  20. https://data.gateapi.io/api2/1/tradeHistory/link_try
  21. https://data.gateapi.io/api2/1/tradeHistory/hot_try
  22. https://data.gateapi.io/api2/1/tradeHistory/gst_try
  23. https://data.gateapi.io/api2/1/tradeHistory/gala_try
  24. https://data.gateapi.io/api2/1/tradeHistory/ftm_try
  25. https://data.gateapi.io/api2/1/tradeHistory/eth_try
  26. https://data.gateapi.io/api2/1/tradeHistory/eos_try
  27. https://data.gateapi.io/api2/1/tradeHistory/enj_try
  28. https://data.gateapi.io/api2/1/tradeHistory/dot_try
  29. https://data.gateapi.io/api2/1/tradeHistory/doge_try
  30. https://data.gateapi.io/api2/1/tradeHistory/dai_try
  31. https://data.gateapi.io/api2/1/tradeHistory/crv_try
  32. https://data.gateapi.io/api2/1/tradeHistory/chz_try
  33. https://data.gateapi.io/api2/1/tradeHistory/btt_try
  34. https://data.gateapi.io/api2/1/tradeHistory/btc_try
  35. https://data.gateapi.io/api2/1/tradeHistory/bnb_try
  36. https://data.gateapi.io/api2/1/tradeHistory/bat_try
  37. https://data.gateapi.io/api2/1/tradeHistory/axs_try
  38. https://data.gateapi.io/api2/1/tradeHistory/avax_try
  39. https://data.gateapi.io/api2/1/tradeHistory/atom_try
  40. https://data.gateapi.io/api2/1/tradeHistory/ape_try
  41. https://data.gateapi.io/api2/1/tradeHistory/ankr_try
  42. https://data.gateapi.io/api2/1/tradeHistory/amp_try
  43. https://data.gateapi.io/api2/1/tradeHistory/algo_try
  44. https://data.gateapi.io/api2/1/tradeHistory/ada_try
  45. https://data.gateapi.io/api2/1/tradeHistory/aave_try
  46. https://data.gateapi.io/api2/1/tradeHistory/1inch_try
  47. https://data.gateapi.io/api2/1/tradeHistory/mask_try
  48. https://data.gateapi.io/api2/1/tradeHistory/apt_try
  49. https://data.gateapi.io/api2/1/tradeHistory/ar_try
  50. https://data.gateapi.io/api2/1/tradeHistory/luna_try
  51. https://data.gateapi.io/api2/1/tradeHistory/lunc_try
  52. https://data.gateapi.io/api2/1/tradeHistory/flow_try
  53. https://data.gateapi.io/api2/1/tradeHistory/fil_try
  54. https://data.gateapi.io/api2/1/tradeHistory/dydx_try
  55. https://data.gateapi.io/api2/1/tradeHistory/op_try
  56. https://data.gateapi.io/api2/1/tradeHistory/icp_try
  57. https://data.gateapi.io/api2/1/tradeHistory/lit_try
  58. https://data.gateapi.io/api2/1/tradeHistory/people_try
  59. https://data.gateapi.io/api2/1/tradeHistory/jasmy_try
  60. https://data.gateapi.io/api2/1/tradeHistory/vinu_try
  61. https://data.gateapi.io/api2/1/tradeHistory/arb_try
  62. https://data.gateapi.io/api2/1/tradeHistory/id_try
  63. https://data.gateapi.io/api2/1/tradeHistory/sui_try
  64. https://data.gateapi.io/api2/1/tradeHistory/pepe_try
  65. https://data.gateapi.io/api2/1/tradeHistory/aidoge_try
  66. https://data.gateapi.io/api2/1/tradeHistory/blur_try
  67. https://data.gateapi.io/api2/1/tradeHistory/ordi_try
  68. https://data.gateapi.io/api2/1/tradeHistory/asr_try
  69. https://data.gateapi.io/api2/1/tradeHistory/psg_try
  70. https://data.gateapi.io/api2/1/tradeHistory/acm_try
  71. https://data.gateapi.io/api2/1/tradeHistory/atm_try
  72. https://data.gateapi.io/api2/1/tradeHistory/juv_try
  73. https://data.gateapi.io/api2/1/tradeHistory/sei_try
  74. https://data.gateapi.io/api2/1/tradeHistory/lpt_try
  75. https://data.gateapi.io/api2/1/tradeHistory/cyber_try
  76. https://data.gateapi.io/api2/1/tradeHistory/wld_try
  77. https://data.gateapi.io/api2/1/tradeHistory/hbar_try
  78. https://data.gateapi.io/api2/1/tradeHistory/arkm_try
  79. https://data.gateapi.io/api2/1/tradeHistory/ygg_try
  80. https://data.gateapi.io/api2/1/tradeHistory/flm_try
  81. https://data.gateapi.io/api2/1/tradeHistory/blz_try
  82. https://data.gateapi.io/api2/1/tradeHistory/oax_try
  83. https://data.gateapi.io/api2/1/tradeHistory/unfi_try
  84. https://data.gateapi.io/api2/1/tradeHistory/vgx_try
  85. https://data.gateapi.io/api2/1/tradeHistory/bch_try
  86. https://data.gateapi.io/api2/1/tradeHistory/syn_try
  87. https://data.gateapi.io/api2/1/tradeHistory/dodo_try
  88. https://data.gateapi.io/api2/1/tradeHistory/cfx_try
  89. https://data.gateapi.io/api2/1/tradeHistory/astra_try
  90. https://data.gateapi.io/api2/1/tradeHistory/kas_try
  91. https://data.gateapi.io/api2/1/tradeHistory/lqty_try
  92. https://data.gateapi.io/api2/1/tradeHistory/perp_try
  93. https://data.gateapi.io/api2/1/tradeHistory/snx_try
  94. https://data.gateapi.io/api2/1/tradeHistory/nmr_try
  95. https://data.gateapi.io/api2/1/tradeHistory/matic_try
  96. https://data.gateapi.io/api2/1/tradeHistory/flux_try
  97. https://data.gateapi.io/api2/1/tradeHistory/og_try
  98. https://data.gateapi.io/api2/1/tradeHistory/ftt_try
  99. https://data.gateapi.io/api2/1/tradeHistory/xvg_try
  100. https://data.gateapi.io/api2/1/tradeHistory/ogn_try
  101. https://data.gateapi.io/api2/1/tradeHistory/storj_try
  102. https://data.gateapi.io/api2/1/tradeHistory/hifi_try
  103. https://data.gateapi.io/api2/1/tradeHistory/trb_try
  104. https://data.gateapi.io/api2/1/tradeHistory/srm_try
  105. https://data.gateapi.io/api2/1/tradeHistory/ladys_try
  106. https://data.gateapi.io/api2/1/tradeHistory/akro_try
  107. https://data.gateapi.io/api2/1/tradeHistory/loom_try
  108. https://data.gateapi.io/api2/1/tradeHistory/gari_try
  109. https://data.gateapi.io/api2/1/tradeHistory/fitfi_try
  110. https://data.gateapi.io/api2/1/tradeHistory/bsv_try
  111. https://data.gateapi.io/api2/1/tradeHistory/vra_try
  112. https://data.gateapi.io/api2/1/tradeHistory/etc_try
  113. https://data.gateapi.io/api2/1/tradeHistory/bigtime_try
  114. https://data.gateapi.io/api2/1/tradeHistory/bnt_try
  115. https://data.gateapi.io/api2/1/tradeHistory/flr_try
  116. https://data.gateapi.io/api2/1/tradeHistory/rndr_try
  117. https://data.gateapi.io/api2/1/tradeHistory/btc_usdt
  118. https://data.gateapi.io/api2/1/tradeHistory/eth_usdt
  119. https://data.gateapi.io/api2/1/tradeHistory/xrp_usdt
  120. https://data.gateapi.io/api2/1/tradeHistory/mana_usdt
  121. https://data.gateapi.io/api2/1/tradeHistory/avax_usdt
  122. https://data.gateapi.io/api2/1/tradeHistory/sxp_usdt
  123. https://data.gateapi.io/api2/1/tradeHistory/ada_usdt
  124. https://data.gateapi.io/api2/1/tradeHistory/link_usdt
  125. https://data.gateapi.io/api2/1/tradeHistory/chz_usdt
  126. https://data.gateapi.io/api2/1/tradeHistory/gt_usdt
  127. https://data.gateapi.io/api2/1/tradeHistory/strax_try
  128. https://data.gateapi.io/api2/1/tradeHistory/orbs_try
  129. https://data.gateapi.io/api2/1/tradeHistory/bnx_try
  130. https://data.gateapi.io/api2/1/tradeHistory/fdusd_try
  131. https://data.gateapi.io/api2/1/tradeHistory/mina_try
  132. https://data.gateapi.io/api2/1/tradeHistory/polyx_try
  133. https://data.gateapi.io/api2/1/tradeHistory/inj_try
  134. https://data.gateapi.io/api2/1/tradeHistory/gas_try
  135. https://data.gateapi.io/api2/1/tradeHistory/starl_try
  136. https://data.gateapi.io/api2/1/tradeHistory/slp_try
  137. https://data.gateapi.io/api2/1/tradeHistory/floki_try
  138. https://data.gateapi.io/api2/1/tradeHistory/raca_try
  139. https://data.gateapi.io/api2/1/tradeHistory/tia_try
  140. https://data.gateapi.io/api2/1/tradeHistory/sushi_try
  141. https://data.gateapi.io/api2/1/tradeHistory/meme_try
  142. https://data.gateapi.io/api2/1/tradeHistory/vmpx_try
  143. https://data.gateapi.io/api2/1/tradeHistory/ark_try
  144. https://data.gateapi.io/api2/1/tradeHistory/rune_try
  145. https://data.gateapi.io/api2/1/tradeHistory/near_try
  146. https://data.gateapi.io/api2/1/tradeHistory/cake_try
  147. https://data.gateapi.io/api2/1/tradeHistory/flip_try
  148. https://data.gateapi.io/api2/1/tradeHistory/magic_try
  149. https://data.gateapi.io/api2/1/tradeHistory/ntrn_try
  150. https://data.gateapi.io/api2/1/tradeHistory/ustc_try
  151. https://data.gateapi.io/api2/1/tradeHistory/ethw_try
  152. https://data.gateapi.io/api2/1/tradeHistory/super_try
  153. https://data.gateapi.io/api2/1/tradeHistory/sats_try
  154. https://data.gateapi.io/api2/1/tradeHistory/token_try
  155. https://data.gateapi.io/api2/1/tradeHistory/jto_try
  156. https://data.gateapi.io/api2/1/tradeHistory/bonk_try
  157. https://data.gateapi.io/api2/1/tradeHistory/ace_try
  158. https://data.gateapi.io/api2/1/tradeHistory/nfp_try
  159. https://data.gateapi.io/api2/1/tradeHistory/alt_try
  160. https://data.gateapi.io/api2/1/tradeHistory/pivx_try
  161. https://data.gateapi.io/api2/1/tradeHistory/jup_try
  162. https://data.gateapi.io/api2/1/tradeHistory/dym_try
  163. https://data.gateapi.io/api2/1/tradeHistory/ens_try
  164. https://data.gateapi.io/api2/1/tradeHistory/strk_try
  165. https://data.gateapi.io/api2/1/tradeHistory/zk_try
  166. https://data.gateapi.io/api2/1/tradeHistory/zkj_try
  167. https://data.gateapi.io/api2/1/tradeHistory/venom_try
  168. https://data.gateapi.io/api2/1/tradeHistory/ethfi_try
  169. https://data.gateapi.io/api2/1/tradeHistory/bome_try
  170. https://data.gateapi.io/api2/1/tradeHistory/zk_usdt
  171. https://data.gateapi.io/api2/1/tradeHistory/venom_usdt
  172. https://data.gateapi.io/api2/1/tradeHistory/ethfi_usdt
  173. https://data.gateapi.io/api2/1/tradeHistory/zkj_usdt
  174. https://data.gateapi.io/api2/1/tradeHistory/wen_usdt

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/tradeHistory/eth_btc/3275876
    # Response
    {
        "result": "true",
        "data": [
                {
                "tradeID": 3175762,
                "date": "2017-08-25 07:24:28",
                "type": "sell",
                "rate": 29011,
                "amount": 0.0019,
                "total": 55.1209,
                "fee": "0",
                "fee_coin": "btc",
                "gt_fee":"0",
                "point_fee":"0.1213",
                },
                {
                "tradeID": 3175771,
                "date": "2017-08-25 07:24:41",
                "type": "sell",
                "rate": 29011,
                "amount": 0.0032,
                "total": 92.8352,
                "fee": "0.0002",
                "fee_coin": "btc",
                "gt_fee":"0",
                "point_fee":"0",
                }
            ],
        "elapsed": "31.518ms"
    }
            

返回值说明

    amount: 成交币种数量
    date: 订单时间
    rate: 币种单价
    total: 订单总额
    tradeID: tradeID
    type: 买卖类型, buy买 sell卖 
    fee: 手续费
    fee_coin: 手续费币种
    gt_fee: GT抵扣的手续费
    point_fee: 点卡抵扣的手续费                

交易市场K线数据

返回市场最近时间段内的K线数据:

URL: https://data.gateapi.io/api2/1/candlestick2/[CURR_A]_[CURR_B]?group_sec=[GROUP_SEC]&range_hour=[RANGE_HOUR]

示例:

    # Request
    https://data.gateapi.io/api2/1/candlestick2/btc_usdt?group_sec=60&range_hour=1
    # Response
    {
		"result": "true",
		"data": [
			[1524556800000, 12.8756391686, 9266.02, 9266.21, 9231.01, 9233.99],
			[1524558600000, 18.3153691562, 9255.79, 9284, 9251.01, 9252],
			[1524560400000, 17.5693326481, 9255, 9290.37, 9238.89, 9255.79],
			[1524562200000, 13.0314933662, 9281.92, 9295, 9239, 9255.4],
			[1524564000000, 26.0352948098, 9290.92, 9327.46, 9282, 9282],
			[1524565800000, 24.5813921079, 9300, 9340, 9290, 9297.5],
			[1524567600000, 27.8742949471, 9345, 9348.99, 9291.91, 9300],
			[1524569400000, 29.3344591996, 9299.99, 9349.99, 9290, 9343.93],
			[1524571200000, 28.4720072519, 9305, 9327.99, 9286.32, 9290.02],
			...
		]
	}
            

返回[range_hour]范围内的K线数据:

URL: https://data.gateapi.io/api2/1/candlestick2/[CURR_A]_[CURR_B]?group_sec=[GROUP_SEC]&range_hour=[RANGE_HOUR]

请替换 [CURR_A] 和 [CURR_B] 为您需要查看的币种,GROUP_SEC 和 RANGE_HOUR 替换为需要获取的时间区域.

支持的兑换类型:

  1. https://data.gateapi.io/api2/1/candlestick2/xtz_try?group_set=60&range_hour=1
  2. https://data.gateapi.io/api2/1/candlestick2/xrp_try?group_set=60&range_hour=1
  3. https://data.gateapi.io/api2/1/candlestick2/xlm_try?group_set=60&range_hour=1
  4. https://data.gateapi.io/api2/1/candlestick2/wbtc_try?group_set=60&range_hour=1
  5. https://data.gateapi.io/api2/1/candlestick2/waves_try?group_set=60&range_hour=1
  6. https://data.gateapi.io/api2/1/candlestick2/usdt_try?group_set=60&range_hour=1
  7. https://data.gateapi.io/api2/1/candlestick2/uni_try?group_set=60&range_hour=1
  8. https://data.gateapi.io/api2/1/candlestick2/uma_try?group_set=60&range_hour=1
  9. https://data.gateapi.io/api2/1/candlestick2/trx_try?group_set=60&range_hour=1
  10. https://data.gateapi.io/api2/1/candlestick2/sxp_try?group_set=60&range_hour=1
  11. https://data.gateapi.io/api2/1/candlestick2/sol_try?group_set=60&range_hour=1
  12. https://data.gateapi.io/api2/1/candlestick2/shib_try?group_set=60&range_hour=1
  13. https://data.gateapi.io/api2/1/candlestick2/sand_try?group_set=60&range_hour=1
  14. https://data.gateapi.io/api2/1/candlestick2/omg_try?group_set=60&range_hour=1
  15. https://data.gateapi.io/api2/1/candlestick2/neo_try?group_set=60&range_hour=1
  16. https://data.gateapi.io/api2/1/candlestick2/mkr_try?group_set=60&range_hour=1
  17. https://data.gateapi.io/api2/1/candlestick2/mana_try?group_set=60&range_hour=1
  18. https://data.gateapi.io/api2/1/candlestick2/ltc_try?group_set=60&range_hour=1
  19. https://data.gateapi.io/api2/1/candlestick2/lrc_try?group_set=60&range_hour=1
  20. https://data.gateapi.io/api2/1/candlestick2/link_try?group_set=60&range_hour=1
  21. https://data.gateapi.io/api2/1/candlestick2/hot_try?group_set=60&range_hour=1
  22. https://data.gateapi.io/api2/1/candlestick2/gst_try?group_set=60&range_hour=1
  23. https://data.gateapi.io/api2/1/candlestick2/gala_try?group_set=60&range_hour=1
  24. https://data.gateapi.io/api2/1/candlestick2/ftm_try?group_set=60&range_hour=1
  25. https://data.gateapi.io/api2/1/candlestick2/eth_try?group_set=60&range_hour=1
  26. https://data.gateapi.io/api2/1/candlestick2/eos_try?group_set=60&range_hour=1
  27. https://data.gateapi.io/api2/1/candlestick2/enj_try?group_set=60&range_hour=1
  28. https://data.gateapi.io/api2/1/candlestick2/dot_try?group_set=60&range_hour=1
  29. https://data.gateapi.io/api2/1/candlestick2/doge_try?group_set=60&range_hour=1
  30. https://data.gateapi.io/api2/1/candlestick2/dai_try?group_set=60&range_hour=1
  31. https://data.gateapi.io/api2/1/candlestick2/crv_try?group_set=60&range_hour=1
  32. https://data.gateapi.io/api2/1/candlestick2/chz_try?group_set=60&range_hour=1
  33. https://data.gateapi.io/api2/1/candlestick2/btt_try?group_set=60&range_hour=1
  34. https://data.gateapi.io/api2/1/candlestick2/btc_try?group_set=60&range_hour=1
  35. https://data.gateapi.io/api2/1/candlestick2/bnb_try?group_set=60&range_hour=1
  36. https://data.gateapi.io/api2/1/candlestick2/bat_try?group_set=60&range_hour=1
  37. https://data.gateapi.io/api2/1/candlestick2/axs_try?group_set=60&range_hour=1
  38. https://data.gateapi.io/api2/1/candlestick2/avax_try?group_set=60&range_hour=1
  39. https://data.gateapi.io/api2/1/candlestick2/atom_try?group_set=60&range_hour=1
  40. https://data.gateapi.io/api2/1/candlestick2/ape_try?group_set=60&range_hour=1
  41. https://data.gateapi.io/api2/1/candlestick2/ankr_try?group_set=60&range_hour=1
  42. https://data.gateapi.io/api2/1/candlestick2/amp_try?group_set=60&range_hour=1
  43. https://data.gateapi.io/api2/1/candlestick2/algo_try?group_set=60&range_hour=1
  44. https://data.gateapi.io/api2/1/candlestick2/ada_try?group_set=60&range_hour=1
  45. https://data.gateapi.io/api2/1/candlestick2/aave_try?group_set=60&range_hour=1
  46. https://data.gateapi.io/api2/1/candlestick2/1inch_try?group_set=60&range_hour=1
  47. https://data.gateapi.io/api2/1/candlestick2/mask_try?group_set=60&range_hour=1
  48. https://data.gateapi.io/api2/1/candlestick2/apt_try?group_set=60&range_hour=1
  49. https://data.gateapi.io/api2/1/candlestick2/ar_try?group_set=60&range_hour=1
  50. https://data.gateapi.io/api2/1/candlestick2/luna_try?group_set=60&range_hour=1
  51. https://data.gateapi.io/api2/1/candlestick2/lunc_try?group_set=60&range_hour=1
  52. https://data.gateapi.io/api2/1/candlestick2/flow_try?group_set=60&range_hour=1
  53. https://data.gateapi.io/api2/1/candlestick2/fil_try?group_set=60&range_hour=1
  54. https://data.gateapi.io/api2/1/candlestick2/dydx_try?group_set=60&range_hour=1
  55. https://data.gateapi.io/api2/1/candlestick2/op_try?group_set=60&range_hour=1
  56. https://data.gateapi.io/api2/1/candlestick2/icp_try?group_set=60&range_hour=1
  57. https://data.gateapi.io/api2/1/candlestick2/lit_try?group_set=60&range_hour=1
  58. https://data.gateapi.io/api2/1/candlestick2/people_try?group_set=60&range_hour=1
  59. https://data.gateapi.io/api2/1/candlestick2/jasmy_try?group_set=60&range_hour=1
  60. https://data.gateapi.io/api2/1/candlestick2/vinu_try?group_set=60&range_hour=1
  61. https://data.gateapi.io/api2/1/candlestick2/arb_try?group_set=60&range_hour=1
  62. https://data.gateapi.io/api2/1/candlestick2/id_try?group_set=60&range_hour=1
  63. https://data.gateapi.io/api2/1/candlestick2/sui_try?group_set=60&range_hour=1
  64. https://data.gateapi.io/api2/1/candlestick2/pepe_try?group_set=60&range_hour=1
  65. https://data.gateapi.io/api2/1/candlestick2/aidoge_try?group_set=60&range_hour=1
  66. https://data.gateapi.io/api2/1/candlestick2/blur_try?group_set=60&range_hour=1
  67. https://data.gateapi.io/api2/1/candlestick2/ordi_try?group_set=60&range_hour=1
  68. https://data.gateapi.io/api2/1/candlestick2/asr_try?group_set=60&range_hour=1
  69. https://data.gateapi.io/api2/1/candlestick2/psg_try?group_set=60&range_hour=1
  70. https://data.gateapi.io/api2/1/candlestick2/acm_try?group_set=60&range_hour=1
  71. https://data.gateapi.io/api2/1/candlestick2/atm_try?group_set=60&range_hour=1
  72. https://data.gateapi.io/api2/1/candlestick2/juv_try?group_set=60&range_hour=1
  73. https://data.gateapi.io/api2/1/candlestick2/sei_try?group_set=60&range_hour=1
  74. https://data.gateapi.io/api2/1/candlestick2/lpt_try?group_set=60&range_hour=1
  75. https://data.gateapi.io/api2/1/candlestick2/cyber_try?group_set=60&range_hour=1
  76. https://data.gateapi.io/api2/1/candlestick2/wld_try?group_set=60&range_hour=1
  77. https://data.gateapi.io/api2/1/candlestick2/hbar_try?group_set=60&range_hour=1
  78. https://data.gateapi.io/api2/1/candlestick2/arkm_try?group_set=60&range_hour=1
  79. https://data.gateapi.io/api2/1/candlestick2/ygg_try?group_set=60&range_hour=1
  80. https://data.gateapi.io/api2/1/candlestick2/flm_try?group_set=60&range_hour=1
  81. https://data.gateapi.io/api2/1/candlestick2/blz_try?group_set=60&range_hour=1
  82. https://data.gateapi.io/api2/1/candlestick2/oax_try?group_set=60&range_hour=1
  83. https://data.gateapi.io/api2/1/candlestick2/unfi_try?group_set=60&range_hour=1
  84. https://data.gateapi.io/api2/1/candlestick2/vgx_try?group_set=60&range_hour=1
  85. https://data.gateapi.io/api2/1/candlestick2/bch_try?group_set=60&range_hour=1
  86. https://data.gateapi.io/api2/1/candlestick2/syn_try?group_set=60&range_hour=1
  87. https://data.gateapi.io/api2/1/candlestick2/dodo_try?group_set=60&range_hour=1
  88. https://data.gateapi.io/api2/1/candlestick2/cfx_try?group_set=60&range_hour=1
  89. https://data.gateapi.io/api2/1/candlestick2/astra_try?group_set=60&range_hour=1
  90. https://data.gateapi.io/api2/1/candlestick2/kas_try?group_set=60&range_hour=1
  91. https://data.gateapi.io/api2/1/candlestick2/lqty_try?group_set=60&range_hour=1
  92. https://data.gateapi.io/api2/1/candlestick2/perp_try?group_set=60&range_hour=1
  93. https://data.gateapi.io/api2/1/candlestick2/snx_try?group_set=60&range_hour=1
  94. https://data.gateapi.io/api2/1/candlestick2/nmr_try?group_set=60&range_hour=1
  95. https://data.gateapi.io/api2/1/candlestick2/matic_try?group_set=60&range_hour=1
  96. https://data.gateapi.io/api2/1/candlestick2/flux_try?group_set=60&range_hour=1
  97. https://data.gateapi.io/api2/1/candlestick2/og_try?group_set=60&range_hour=1
  98. https://data.gateapi.io/api2/1/candlestick2/ftt_try?group_set=60&range_hour=1
  99. https://data.gateapi.io/api2/1/candlestick2/xvg_try?group_set=60&range_hour=1
  100. https://data.gateapi.io/api2/1/candlestick2/ogn_try?group_set=60&range_hour=1
  101. https://data.gateapi.io/api2/1/candlestick2/storj_try?group_set=60&range_hour=1
  102. https://data.gateapi.io/api2/1/candlestick2/hifi_try?group_set=60&range_hour=1
  103. https://data.gateapi.io/api2/1/candlestick2/trb_try?group_set=60&range_hour=1
  104. https://data.gateapi.io/api2/1/candlestick2/srm_try?group_set=60&range_hour=1
  105. https://data.gateapi.io/api2/1/candlestick2/ladys_try?group_set=60&range_hour=1
  106. https://data.gateapi.io/api2/1/candlestick2/akro_try?group_set=60&range_hour=1
  107. https://data.gateapi.io/api2/1/candlestick2/loom_try?group_set=60&range_hour=1
  108. https://data.gateapi.io/api2/1/candlestick2/gari_try?group_set=60&range_hour=1
  109. https://data.gateapi.io/api2/1/candlestick2/fitfi_try?group_set=60&range_hour=1
  110. https://data.gateapi.io/api2/1/candlestick2/bsv_try?group_set=60&range_hour=1
  111. https://data.gateapi.io/api2/1/candlestick2/vra_try?group_set=60&range_hour=1
  112. https://data.gateapi.io/api2/1/candlestick2/etc_try?group_set=60&range_hour=1
  113. https://data.gateapi.io/api2/1/candlestick2/bigtime_try?group_set=60&range_hour=1
  114. https://data.gateapi.io/api2/1/candlestick2/bnt_try?group_set=60&range_hour=1
  115. https://data.gateapi.io/api2/1/candlestick2/flr_try?group_set=60&range_hour=1
  116. https://data.gateapi.io/api2/1/candlestick2/rndr_try?group_set=60&range_hour=1
  117. https://data.gateapi.io/api2/1/candlestick2/btc_usdt?group_set=60&range_hour=1
  118. https://data.gateapi.io/api2/1/candlestick2/eth_usdt?group_set=60&range_hour=1
  119. https://data.gateapi.io/api2/1/candlestick2/xrp_usdt?group_set=60&range_hour=1
  120. https://data.gateapi.io/api2/1/candlestick2/mana_usdt?group_set=60&range_hour=1
  121. https://data.gateapi.io/api2/1/candlestick2/avax_usdt?group_set=60&range_hour=1
  122. https://data.gateapi.io/api2/1/candlestick2/sxp_usdt?group_set=60&range_hour=1
  123. https://data.gateapi.io/api2/1/candlestick2/ada_usdt?group_set=60&range_hour=1
  124. https://data.gateapi.io/api2/1/candlestick2/link_usdt?group_set=60&range_hour=1
  125. https://data.gateapi.io/api2/1/candlestick2/chz_usdt?group_set=60&range_hour=1
  126. https://data.gateapi.io/api2/1/candlestick2/gt_usdt?group_set=60&range_hour=1
  127. https://data.gateapi.io/api2/1/candlestick2/strax_try?group_set=60&range_hour=1
  128. https://data.gateapi.io/api2/1/candlestick2/orbs_try?group_set=60&range_hour=1
  129. https://data.gateapi.io/api2/1/candlestick2/bnx_try?group_set=60&range_hour=1
  130. https://data.gateapi.io/api2/1/candlestick2/fdusd_try?group_set=60&range_hour=1
  131. https://data.gateapi.io/api2/1/candlestick2/mina_try?group_set=60&range_hour=1
  132. https://data.gateapi.io/api2/1/candlestick2/polyx_try?group_set=60&range_hour=1
  133. https://data.gateapi.io/api2/1/candlestick2/inj_try?group_set=60&range_hour=1
  134. https://data.gateapi.io/api2/1/candlestick2/gas_try?group_set=60&range_hour=1
  135. https://data.gateapi.io/api2/1/candlestick2/starl_try?group_set=60&range_hour=1
  136. https://data.gateapi.io/api2/1/candlestick2/slp_try?group_set=60&range_hour=1
  137. https://data.gateapi.io/api2/1/candlestick2/floki_try?group_set=60&range_hour=1
  138. https://data.gateapi.io/api2/1/candlestick2/raca_try?group_set=60&range_hour=1
  139. https://data.gateapi.io/api2/1/candlestick2/tia_try?group_set=60&range_hour=1
  140. https://data.gateapi.io/api2/1/candlestick2/sushi_try?group_set=60&range_hour=1
  141. https://data.gateapi.io/api2/1/candlestick2/meme_try?group_set=60&range_hour=1
  142. https://data.gateapi.io/api2/1/candlestick2/vmpx_try?group_set=60&range_hour=1
  143. https://data.gateapi.io/api2/1/candlestick2/ark_try?group_set=60&range_hour=1
  144. https://data.gateapi.io/api2/1/candlestick2/rune_try?group_set=60&range_hour=1
  145. https://data.gateapi.io/api2/1/candlestick2/near_try?group_set=60&range_hour=1
  146. https://data.gateapi.io/api2/1/candlestick2/cake_try?group_set=60&range_hour=1
  147. https://data.gateapi.io/api2/1/candlestick2/flip_try?group_set=60&range_hour=1
  148. https://data.gateapi.io/api2/1/candlestick2/magic_try?group_set=60&range_hour=1
  149. https://data.gateapi.io/api2/1/candlestick2/ntrn_try?group_set=60&range_hour=1
  150. https://data.gateapi.io/api2/1/candlestick2/ustc_try?group_set=60&range_hour=1
  151. https://data.gateapi.io/api2/1/candlestick2/ethw_try?group_set=60&range_hour=1
  152. https://data.gateapi.io/api2/1/candlestick2/super_try?group_set=60&range_hour=1
  153. https://data.gateapi.io/api2/1/candlestick2/sats_try?group_set=60&range_hour=1
  154. https://data.gateapi.io/api2/1/candlestick2/token_try?group_set=60&range_hour=1
  155. https://data.gateapi.io/api2/1/candlestick2/jto_try?group_set=60&range_hour=1
  156. https://data.gateapi.io/api2/1/candlestick2/bonk_try?group_set=60&range_hour=1
  157. https://data.gateapi.io/api2/1/candlestick2/ace_try?group_set=60&range_hour=1
  158. https://data.gateapi.io/api2/1/candlestick2/nfp_try?group_set=60&range_hour=1
  159. https://data.gateapi.io/api2/1/candlestick2/alt_try?group_set=60&range_hour=1
  160. https://data.gateapi.io/api2/1/candlestick2/pivx_try?group_set=60&range_hour=1
  161. https://data.gateapi.io/api2/1/candlestick2/jup_try?group_set=60&range_hour=1
  162. https://data.gateapi.io/api2/1/candlestick2/dym_try?group_set=60&range_hour=1
  163. https://data.gateapi.io/api2/1/candlestick2/ens_try?group_set=60&range_hour=1
  164. https://data.gateapi.io/api2/1/candlestick2/strk_try?group_set=60&range_hour=1
  165. https://data.gateapi.io/api2/1/candlestick2/zk_try?group_set=60&range_hour=1
  166. https://data.gateapi.io/api2/1/candlestick2/zkj_try?group_set=60&range_hour=1
  167. https://data.gateapi.io/api2/1/candlestick2/venom_try?group_set=60&range_hour=1
  168. https://data.gateapi.io/api2/1/candlestick2/ethfi_try?group_set=60&range_hour=1
  169. https://data.gateapi.io/api2/1/candlestick2/bome_try?group_set=60&range_hour=1
  170. https://data.gateapi.io/api2/1/candlestick2/zk_usdt?group_set=60&range_hour=1
  171. https://data.gateapi.io/api2/1/candlestick2/venom_usdt?group_set=60&range_hour=1
  172. https://data.gateapi.io/api2/1/candlestick2/ethfi_usdt?group_set=60&range_hour=1
  173. https://data.gateapi.io/api2/1/candlestick2/zkj_usdt?group_set=60&range_hour=1
  174. https://data.gateapi.io/api2/1/candlestick2/wen_usdt?group_set=60&range_hour=1

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/candlestick2/btc_usdt?group_sec=60&range_hour=1
    # Response
    {
		"result": "true",
		"data": [
			[1524556800000, 12.8756391686, 9266.02, 9266.21, 9231.01, 9233.99],
			[1524558600000, 18.3153691562, 9255.79, 9284, 9251.01, 9252],
			[1524560400000, 17.5693326481, 9255, 9290.37, 9238.89, 9255.79],
			[1524562200000, 13.0314933662, 9281.92, 9295, 9239, 9255.4],
			[1524564000000, 26.0352948098, 9290.92, 9327.46, 9282, 9282],
			[1524565800000, 24.5813921079, 9300, 9340, 9290, 9297.5],
			[1524567600000, 27.8742949471, 9345, 9348.99, 9291.91, 9300],
			[1524569400000, 29.3344591996, 9299.99, 9349.99, 9290, 9343.93],
			[1524571200000, 28.4720072519, 9305, 9327.99, 9286.32, 9290.02],
			...
		]
	}
            

返回值说明

   time: 时间戳
   volume: 交易量
   close: 收盘价
   最高价
   low: 最低价
   open: 开盘价				

C2C交易市场深度 API

返回系统支持的所有C2C交易对的市场深度(委托挂单),其中 asks 是委卖单, bids 是委买单。

URL: https://data.gateapi.io/api2/1/orderBooks_c2c


当前市场深度 API

返回当前C2C交易市场深度(委托挂单),其中 asks 是委卖单, bids 是委买单。

URL: https://data.gateapi.io/api2/1/orderBook_c2c/[CURR_A]_[CURR_B]

请替换 [CURR_A] and [CURR_B] 为您需要查看的币种.

支持的兑换类型:

  1. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_cny
  2. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_vnd
  3. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_usd
  4. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_inr
  5. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_try
  6. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_ngn
  7. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_uah
  8. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_rub
  9. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_eur
  10. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_brl
  11. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_pgk
  12. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_thb
  13. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_pkr
  14. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_bdt
  15. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_php
  16. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_gbp
  17. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_idr
  18. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_zar
  19. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_pln
  20. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_sar
  21. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_ars
  22. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_aed
  23. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_kzt
  24. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_egp
  25. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_uzs
  26. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_twd
  27. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_hkd
  28. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_ghs
  29. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_ves
  30. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_xaf
  31. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_xof
  32. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_byn
  33. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_kes
  34. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_mad
  35. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_aud
  36. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_tzs
  37. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_sek
  38. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_azn
  39. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_cop
  40. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_clp
  41. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_huf
  42. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_mxn
  43. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_ron
  44. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_amd
  45. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_dzd
  46. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_npr
  47. https://data.gateapi.io/api2/1/orderBook_c2c/usdt_jod
  48. https://data.gateapi.io/api2/1/orderBook_c2c/btc_cny
  49. https://data.gateapi.io/api2/1/orderBook_c2c/btc_vnd
  50. https://data.gateapi.io/api2/1/orderBook_c2c/btc_usd
  51. https://data.gateapi.io/api2/1/orderBook_c2c/btc_inr
  52. https://data.gateapi.io/api2/1/orderBook_c2c/btc_try
  53. https://data.gateapi.io/api2/1/orderBook_c2c/btc_ngn
  54. https://data.gateapi.io/api2/1/orderBook_c2c/btc_uah
  55. https://data.gateapi.io/api2/1/orderBook_c2c/btc_rub
  56. https://data.gateapi.io/api2/1/orderBook_c2c/btc_eur
  57. https://data.gateapi.io/api2/1/orderBook_c2c/btc_brl
  58. https://data.gateapi.io/api2/1/orderBook_c2c/btc_pgk
  59. https://data.gateapi.io/api2/1/orderBook_c2c/btc_thb
  60. https://data.gateapi.io/api2/1/orderBook_c2c/btc_pkr
  61. https://data.gateapi.io/api2/1/orderBook_c2c/btc_bdt
  62. https://data.gateapi.io/api2/1/orderBook_c2c/btc_php
  63. https://data.gateapi.io/api2/1/orderBook_c2c/btc_gbp
  64. https://data.gateapi.io/api2/1/orderBook_c2c/btc_idr
  65. https://data.gateapi.io/api2/1/orderBook_c2c/btc_zar
  66. https://data.gateapi.io/api2/1/orderBook_c2c/btc_pln
  67. https://data.gateapi.io/api2/1/orderBook_c2c/btc_sar
  68. https://data.gateapi.io/api2/1/orderBook_c2c/btc_ars
  69. https://data.gateapi.io/api2/1/orderBook_c2c/btc_aed
  70. https://data.gateapi.io/api2/1/orderBook_c2c/btc_kzt
  71. https://data.gateapi.io/api2/1/orderBook_c2c/btc_egp
  72. https://data.gateapi.io/api2/1/orderBook_c2c/btc_uzs
  73. https://data.gateapi.io/api2/1/orderBook_c2c/btc_twd
  74. https://data.gateapi.io/api2/1/orderBook_c2c/btc_hkd
  75. https://data.gateapi.io/api2/1/orderBook_c2c/btc_ghs
  76. https://data.gateapi.io/api2/1/orderBook_c2c/btc_ves
  77. https://data.gateapi.io/api2/1/orderBook_c2c/btc_xaf
  78. https://data.gateapi.io/api2/1/orderBook_c2c/btc_xof
  79. https://data.gateapi.io/api2/1/orderBook_c2c/btc_byn
  80. https://data.gateapi.io/api2/1/orderBook_c2c/btc_kes
  81. https://data.gateapi.io/api2/1/orderBook_c2c/btc_mad
  82. https://data.gateapi.io/api2/1/orderBook_c2c/btc_aud
  83. https://data.gateapi.io/api2/1/orderBook_c2c/btc_tzs
  84. https://data.gateapi.io/api2/1/orderBook_c2c/btc_sek
  85. https://data.gateapi.io/api2/1/orderBook_c2c/btc_azn
  86. https://data.gateapi.io/api2/1/orderBook_c2c/btc_cop
  87. https://data.gateapi.io/api2/1/orderBook_c2c/btc_clp
  88. https://data.gateapi.io/api2/1/orderBook_c2c/btc_huf
  89. https://data.gateapi.io/api2/1/orderBook_c2c/btc_mxn
  90. https://data.gateapi.io/api2/1/orderBook_c2c/btc_ron
  91. https://data.gateapi.io/api2/1/orderBook_c2c/btc_amd
  92. https://data.gateapi.io/api2/1/orderBook_c2c/btc_dzd
  93. https://data.gateapi.io/api2/1/orderBook_c2c/btc_npr
  94. https://data.gateapi.io/api2/1/orderBook_c2c/btc_jod
  95. https://data.gateapi.io/api2/1/orderBook_c2c/eth_cny
  96. https://data.gateapi.io/api2/1/orderBook_c2c/eth_vnd
  97. https://data.gateapi.io/api2/1/orderBook_c2c/eth_usd
  98. https://data.gateapi.io/api2/1/orderBook_c2c/eth_inr
  99. https://data.gateapi.io/api2/1/orderBook_c2c/eth_try
  100. https://data.gateapi.io/api2/1/orderBook_c2c/eth_ngn
  101. https://data.gateapi.io/api2/1/orderBook_c2c/eth_uah
  102. https://data.gateapi.io/api2/1/orderBook_c2c/eth_rub
  103. https://data.gateapi.io/api2/1/orderBook_c2c/eth_eur
  104. https://data.gateapi.io/api2/1/orderBook_c2c/eth_brl
  105. https://data.gateapi.io/api2/1/orderBook_c2c/eth_pgk
  106. https://data.gateapi.io/api2/1/orderBook_c2c/eth_thb
  107. https://data.gateapi.io/api2/1/orderBook_c2c/eth_pkr
  108. https://data.gateapi.io/api2/1/orderBook_c2c/eth_bdt
  109. https://data.gateapi.io/api2/1/orderBook_c2c/eth_php
  110. https://data.gateapi.io/api2/1/orderBook_c2c/eth_gbp
  111. https://data.gateapi.io/api2/1/orderBook_c2c/eth_idr
  112. https://data.gateapi.io/api2/1/orderBook_c2c/eth_zar
  113. https://data.gateapi.io/api2/1/orderBook_c2c/eth_pln
  114. https://data.gateapi.io/api2/1/orderBook_c2c/eth_sar
  115. https://data.gateapi.io/api2/1/orderBook_c2c/eth_ars
  116. https://data.gateapi.io/api2/1/orderBook_c2c/eth_aed
  117. https://data.gateapi.io/api2/1/orderBook_c2c/eth_kzt
  118. https://data.gateapi.io/api2/1/orderBook_c2c/eth_egp
  119. https://data.gateapi.io/api2/1/orderBook_c2c/eth_uzs
  120. https://data.gateapi.io/api2/1/orderBook_c2c/eth_twd
  121. https://data.gateapi.io/api2/1/orderBook_c2c/eth_hkd
  122. https://data.gateapi.io/api2/1/orderBook_c2c/eth_ghs
  123. https://data.gateapi.io/api2/1/orderBook_c2c/eth_ves
  124. https://data.gateapi.io/api2/1/orderBook_c2c/eth_xaf
  125. https://data.gateapi.io/api2/1/orderBook_c2c/eth_xof
  126. https://data.gateapi.io/api2/1/orderBook_c2c/eth_byn
  127. https://data.gateapi.io/api2/1/orderBook_c2c/eth_kes
  128. https://data.gateapi.io/api2/1/orderBook_c2c/eth_mad
  129. https://data.gateapi.io/api2/1/orderBook_c2c/eth_aud
  130. https://data.gateapi.io/api2/1/orderBook_c2c/eth_tzs
  131. https://data.gateapi.io/api2/1/orderBook_c2c/eth_sek
  132. https://data.gateapi.io/api2/1/orderBook_c2c/eth_azn
  133. https://data.gateapi.io/api2/1/orderBook_c2c/eth_cop
  134. https://data.gateapi.io/api2/1/orderBook_c2c/eth_clp
  135. https://data.gateapi.io/api2/1/orderBook_c2c/eth_huf
  136. https://data.gateapi.io/api2/1/orderBook_c2c/eth_mxn
  137. https://data.gateapi.io/api2/1/orderBook_c2c/eth_ron
  138. https://data.gateapi.io/api2/1/orderBook_c2c/eth_amd
  139. https://data.gateapi.io/api2/1/orderBook_c2c/eth_dzd
  140. https://data.gateapi.io/api2/1/orderBook_c2c/eth_npr
  141. https://data.gateapi.io/api2/1/orderBook_c2c/eth_jod
  142. https://data.gateapi.io/api2/1/orderBook_c2c/doge_cny
  143. https://data.gateapi.io/api2/1/orderBook_c2c/doge_vnd
  144. https://data.gateapi.io/api2/1/orderBook_c2c/doge_usd
  145. https://data.gateapi.io/api2/1/orderBook_c2c/doge_inr
  146. https://data.gateapi.io/api2/1/orderBook_c2c/doge_try
  147. https://data.gateapi.io/api2/1/orderBook_c2c/doge_ngn
  148. https://data.gateapi.io/api2/1/orderBook_c2c/doge_uah
  149. https://data.gateapi.io/api2/1/orderBook_c2c/doge_rub
  150. https://data.gateapi.io/api2/1/orderBook_c2c/doge_eur
  151. https://data.gateapi.io/api2/1/orderBook_c2c/doge_brl
  152. https://data.gateapi.io/api2/1/orderBook_c2c/doge_pgk
  153. https://data.gateapi.io/api2/1/orderBook_c2c/doge_thb
  154. https://data.gateapi.io/api2/1/orderBook_c2c/doge_pkr
  155. https://data.gateapi.io/api2/1/orderBook_c2c/doge_bdt
  156. https://data.gateapi.io/api2/1/orderBook_c2c/doge_php
  157. https://data.gateapi.io/api2/1/orderBook_c2c/doge_gbp
  158. https://data.gateapi.io/api2/1/orderBook_c2c/doge_idr
  159. https://data.gateapi.io/api2/1/orderBook_c2c/doge_zar
  160. https://data.gateapi.io/api2/1/orderBook_c2c/doge_pln
  161. https://data.gateapi.io/api2/1/orderBook_c2c/doge_sar
  162. https://data.gateapi.io/api2/1/orderBook_c2c/doge_ars
  163. https://data.gateapi.io/api2/1/orderBook_c2c/doge_aed
  164. https://data.gateapi.io/api2/1/orderBook_c2c/doge_kzt
  165. https://data.gateapi.io/api2/1/orderBook_c2c/doge_egp
  166. https://data.gateapi.io/api2/1/orderBook_c2c/doge_uzs
  167. https://data.gateapi.io/api2/1/orderBook_c2c/doge_twd
  168. https://data.gateapi.io/api2/1/orderBook_c2c/doge_hkd
  169. https://data.gateapi.io/api2/1/orderBook_c2c/doge_ghs
  170. https://data.gateapi.io/api2/1/orderBook_c2c/doge_ves
  171. https://data.gateapi.io/api2/1/orderBook_c2c/doge_xaf
  172. https://data.gateapi.io/api2/1/orderBook_c2c/doge_xof
  173. https://data.gateapi.io/api2/1/orderBook_c2c/doge_byn
  174. https://data.gateapi.io/api2/1/orderBook_c2c/doge_kes
  175. https://data.gateapi.io/api2/1/orderBook_c2c/doge_mad
  176. https://data.gateapi.io/api2/1/orderBook_c2c/doge_aud
  177. https://data.gateapi.io/api2/1/orderBook_c2c/doge_tzs
  178. https://data.gateapi.io/api2/1/orderBook_c2c/doge_sek
  179. https://data.gateapi.io/api2/1/orderBook_c2c/doge_azn
  180. https://data.gateapi.io/api2/1/orderBook_c2c/doge_cop
  181. https://data.gateapi.io/api2/1/orderBook_c2c/doge_clp
  182. https://data.gateapi.io/api2/1/orderBook_c2c/doge_huf
  183. https://data.gateapi.io/api2/1/orderBook_c2c/doge_mxn
  184. https://data.gateapi.io/api2/1/orderBook_c2c/doge_ron
  185. https://data.gateapi.io/api2/1/orderBook_c2c/doge_amd
  186. https://data.gateapi.io/api2/1/orderBook_c2c/doge_dzd
  187. https://data.gateapi.io/api2/1/orderBook_c2c/doge_npr
  188. https://data.gateapi.io/api2/1/orderBook_c2c/doge_jod

示例:

    # Request
    GET: https://data.gateapi.io/api2/1/orderBook_c2c/usdt_cny
    # Response
	{
		"result": "true",
		"asks": [
			["6.86", "306.1114", "100.0000", "30000.0000"],
			["6.86", "808.0467", "100.0000", "4220.0000"],
			["6.86", "12922.3622", "200.0000", "24131.4000"],
			["6.86", "4412.0000", "300.0000", "4412.0000"]
		],
		"bids": [
			["6.84", "3654.9707", "3654.0000", "3654.9700"],
			["6.84", "17487.1700", "1500.0000", "30000.0000"],
			["6.84", "21.1317", "20.0000", "1461.9883"],
			["6.83", "27846.0000", "800.0000", "30000.0000"]
		]
	},
            

返回值说明

    asks :卖方深度
    bids :买方深度

    price: 委托价
    amount: 数量
    min_amount: 单笔最小交易量
    max_amount: 单笔最大交易量				

自动交易 API

系统返回错误码对应说明

用户首先要通过这个链接获取API接口身份认证用到的Key和Secret。然后在程序中用Secret作为密码,通过SHA512加密方式签名需要POST给服务器的数据得到Sign,并在HTTPS请求的Header部分传回Key和Sign。请参考以下接口说明和例子程序进行设置。

获取帐号资金余额API

API URL: https://api.gateio.la/api2/1/private/balances

参数数据提交方式:POST

参数:无

返回数据格式:JSON

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/balances
    # Response
    {
        "result": "true",
        "available": {
            "BTC": "1000",
            "ETH": "968.8",
            "ETC": "0",
            },
        "locked": {
            "ETH": "1"
            }
    }
            

返回值说明

    available: 可用各币种资金余额
    locked : 冻结币种金额

获取杠杆帐号资金余额API

API URL: https://api.gateio.la/api2/1/private/marginbalances

参数数据提交方式:POST

参数:无

返回数据格式:JSON

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/marginbalances
    # Response
    {
        "result": "true",
        "datas": [
            {
                "market": "BTC_USDT",
                "curr_a": "BTC",
                "curr_b": "USDT",
                "available_a": "99.993214",
                "available_b": "9994.000035",
                "frozen_a": "0.000000",
                "frozen_b": "0.000000",
                "borrowed_a": "0.000000",
                "borrowed_b": "0.000000"
            }
        ]
    }
                    

返回值说明

    market: 交易对
    curr_a: 交易货币
    curr_b: 计价货币
    available_a: 交易货币可用额度
    available_b: 计价货币可用额度
    frozen_a: 交易货币冻结资金
    frozen_b: 计价货币冻结资金
    borrowed_a: 交易货币借入资金 
    borrowed_b: 计价货币借入资金        

获取理财帐号资金余额API

API URL: https://api.gateio.la/api2/1/private/fundingbalances

参数数据提交方式:POST

参数:无

返回数据格式:JSON

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/fundingbalances
    # Response
    {
        "result": "true",
        "datas": [
            {
                "asset": "BTC",
                "available": "0.000000",
                "freeze": "10.000000",
                "lent": "0.000000",
                "total_lend": "10.000000"
            },
            {
                "asset": "USDT",
                "available": "0.000000",
                "freeze": "0.000000",
                "lent": "0.000000",
                "total_lend": "0.000000"
            },
            {
                "asset": "ETH",
                "available": "99987.911780",
                "freeze": "0.000000",
                "lent": "0.000000",
                "total_lend": "0.000000"
            }
        ]
    }
                    

返回值说明

    asset: 币种,
    available: 可用资产
    freeze: 冻结资产
    lent: 借出金额
    total_lend: 理财总计         

获取充值地址API

API URL: https://api.gateio.la/api2/1/private/depositAddress

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
currency String 币种 如(BTC, LTC)

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/depositAddress
    # Response
    {
        "result": "true",
        "addr": "gateiowallet",
        "multichain_addresses": [{
            "chain": "BTC",
            "address": "1AW9TZBVnmVYtbrieiQiLMiN7nwRJjJ9mx",
            "payment_id": "",
            "payment_name": "",
            "obtain_failed": 0
        }, {
            "chain": "ETH",
            "address": "0xDd5e3A7eb45fbb6E8070F1B6292BF22670F1775D",
            "payment_id": "",
            "payment_name": "",
            "obtain_failed": 0
        }, {
            "chain": "TRX",
            "address": "TW9hDZgCUXpfmnMVacju1CL8xW2ch2FZfT",
            "payment_id": "",
            "payment_name": "",
            "obtain_failed": 0
        }, {
            "chain": "EOS",
            "address": "gateiowallet",
            "payment_id": "00053f26ad281b8c",
            "payment_name": "Memo",
            "obtain_failed": 0
        }],
        "message": "Sucess",
        "code": 0
    }
            

返回值说明

    addr: 钱包地址

获取充值提现历史API

API URL: https://api.gateio.la/api2/1/private/depositsWithdrawals

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
start String 起始UNIX时间(如 1469092370)
end String 终止UNIX时间(如 1469713981)
sortType String 排序顺序("ASC":升序,"DESC":降序)
page String 页码,取值从1开始

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/depositsWithdrawals
    # Response
    {
        "result": "true",
        "deposits": [
                {
                "id": "c204730",
                "currency": "ETH",
                "address": "1111 1111 1111 1111 1111 1",
                "amount": "222.61",
                "txid": "210496",
                "timestamp": "1474962729",
                "status": "DONE",
                "fee":"0.1"
                }

            ],
        "withdraws": [
                {
                "currency": "ETC",
                "address": "addr2",
                "amount": "600000000",
                "txid": "2104963",
                "timestamp": "1469092378",
                "status": "DONE",
                "fee":"0.1"
                }
            ],
        "message": "Success"
    }
            

返回值说明

    deposits: 充值
    withdraws: 提现
    currency: 币种
    address: 充值/提现地址
    amount: 金额
    timestamp: 发起时间戳
    status: 记录状态 DONE:完成; CANCEL:取消; REQUEST:请求中 
    fee : 交易费

下单交易买入API

API URL: https://api.gateio.la/api2/1/private/buy

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述 示例:
currencyPair String 交易币种对(如btc_usdt,ltc_btc) ltc_btc
rate String 价格 1000
amount String 有效量 800
orderType String 订单类型("gtc":普通订单(默认);“ioc”:立即执行否则取消订单(Immediate -or-Cancel,IOC);"poc":被动委托(只挂单,不吃单)(Pending -or-Cancelled,POC)) ioc
text String 用户自定义订单标识,必须以固定前缀 "t-"开头,不计算前缀的情况下,长度限制为 16 字节,范围 [0-9a-zA-Z-_.]。 t-1128392

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/buy
    # Response
    {
		"result":"true",
		"orderNumber":5825355678,
		"rate":"1000",
		"leftAmount":"0",
		"filledAmount":"0.1",
		"filledRate":"800.00",
                "text":"t-1128392", //用户自定义订单标识,传入则返回,不传入不返回
		"message":"Success"
    }

返回值说明

	orderNumber: 订单单号
	rate: 下单价格
	leftAmount: 剩余数量
	filledAmount: 成交数量
	filledRate: 成交价格
        text:用户自定义订单标识,传入则返回,不传入不返回
				

注:返回的orderNumber可用于查询,取消订单。


下单交易卖出API

API URL: https://api.gateio.la/api2/1/private/sell

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述 示例:
currencyPair String 交易币种对(如btc_usdt,ltc_btc) ltc_btc
rate String 委托价 1000
amount String 有效量 800
orderType String 订单类型("gtc":普通订单(默认);“ioc”:立即执行否则取消订单(Immediate -or-Cancel,IOC);"poc":被动委托(只挂单,不吃单)(Pending -or-Cancelled,POC)) ioc
text String 用户自定义订单标识,必须以固定前缀 "t-"开头,不计算前缀的情况下,长度限制为 16 字节,范围 [0-9a-zA-Z-_.]。 t-1128392

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/sell
    # Response
    {
		"result":"true",
		"orderNumber":5825355678,
		"rate":"1000",
		"leftAmount":"0",
		"filledAmount":"0.1",
		"filledRate":"800.00",
                "text":"t-1128392", //用户自定义订单标识,传入则返回,不传入不返回
		"message":"Success"
    }

返回值说明

	orderNumber: 订单单号
	rate: 下单价格
	leftAmount: 剩余数量
	filledAmount: 成交数量
	filledRate: 成交价格
        text:用户自定义订单标识,传入则返回,不传入不返回				

注:返回的orderNumber可用于查询,取消订单。

批量下单

API URL: https://api.gateio.la/api2/1/private/batch_orders

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述 示例:
batch_orders_json Json text:用户自定义订单标识,必须以固定前缀 "t-"开头,不计算前缀的情况下,长度限制为 16 字节,范围 [0-9a-zA-Z-_.]。

currencyPair:交易币种对(如btc_usdt,ltc_btc)

side: 买卖类型 buy:买入;sell:卖出

rate:委托价

amount:有效量

orderType:订单类型("gtc":普通订单(默认);“ioc”:立即执行否则取消订单(Immediate -or-Cancel,IOC);"poc":被动委托(只挂单,不吃单)(Pending -or-Cancelled,POC))

[{ "text": "t-1001", "currencyPair": "GT_USDT", "rate": 0.01, "amount": 1000, "side": "buy", "orderType": "gtc" },
{ "text": "t-1002", "currencyPair": "BTC_USDT", "rate": 8000, "amount": 0.1, "side": "sell", "orderType": "ioc" } ]

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/batch_orders
    # Response
   {"result":"true","orders":"[[
        {
            "result": "true",
            "message": "Success",
            "code": 0,
            "ctime": 1574846296.986704,
            "side": 2,
            "orderNumber": 28237020,
            "rate": "0.01",
            "leftAmount": "1000.00000000",
            "filledAmount": "0",
            "market": "GT_USDT",
            "iceberg": "0",
            "text": "t-1001",
            "filledRate": "0.010000000",
            "feePercentage": 0.002,
            "feeValue": "0",
            "feeCurrency": "GT",
            "fee": "0 GT"
        },
        {
            "result": "true",
            "message": "Success",
            "code": 0,
            "ctime": 1574846296.995313,
            "side": 1,
            "orderNumber": 28237021,
            "rate": "8000",
            "leftAmount": "0.10000000",
            "filledAmount": "0",
            "market": "BTC_USDT",
            "iceberg": "0",
            "text": "t-1002",
            "filledRate": "8000.000000000",
            "feePercentage": 0.002,
            "feeValue": "0",
            "feeCurrency": "USDT",
            "fee": "0 USDT"}
         ]"
    }

注:每次只能下最多4个交易对且每个交易对只可批量下5个单


取消下单API

API URL: https://api.gateio.la/api2/1/private/cancelOrder

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
orderNumber String 下单单号
currencyPair String 交易币种对(如 ltc_btc)

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/cancelOrder
    # Response
   {"result":"true","message":"Success"}

返回值说明

    result: 是否成功 true成功 false失败
    message: 提示消息

取消多个下单API

API URL: https://api.gateio.la/api2/1/private/cancelOrders

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
orders_json String 下单单号和pair的json数据; 示例:[ { "orderNumber":"7942422" "currencyPair":"ltc_btc" }, { "orderNumber":"7942423" "currencyPair":"ltc_btc" } ]

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/cancelOrders
    # Response
   {"result":"true","message":"Success"}

返回值说明

    result: 是否成功 true成功 false失败
    message: 提示消息

注:批量撤单每次只允许撤销20个订单


取消所有下单API

API URL: https://api.gateio.la/api2/1/private/cancelAllOrders

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
type int 下单类型(0:卖出,1:买入,-1:不限制)
currencyPair String 交易币种对(示例: ltc_btc)

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/cancelAllOrders
    # Response
   {"result":"true","message":"Success"}

返回值说明

    result: 是否成功 true成功 false失败
    message: 提示消息

获取下单状态API

API URL: https://api.gateio.la/api2/1/private/getOrder

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
orderNumber String 下单单号
currencyPair String 交易币种对(如: eth_btc)

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/getOrder
    # Response
    {
        "result":"true",
        "order":{
            "id":"15088",
            "status":"cancelled",
            "currencyPair":"eth_btc",
            "type":"sell",
            "rate":811,
            "amount":"0.39901357",
            "initialRate":811,
            "initialAmount":"1"
            },
        "message":"Success"
    }

返回值说明

    status: 订单状态 open已挂单 cancelled已取消 closed已完成
    currencyPair: 交易对
    type: 买卖类型 sell卖出, buy买入
    rate: 价格
    amount:买卖数量
    initialRate:下单价格
    initialAmount: 下单量                

获取我的当前挂单列表API

API URL: https://api.gateio.la/api2/1/private/openOrders

参数数据提交方式:POST

请求参数

参数名 参数类型 必填 描述
currencyPair String 交易币种对(如: eth_btc)

currencyPair参数为空时,返回所有交易市场挂单

返回数据格式:JSON

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/openOrders
    # Response
    {
        "result": "true", "message": "Success", "code": 0,"elapsed": "6.262ms",
        "orders": [
                {
                "orderNumber": "30032151",
                "type": "buy",
                "rate": 21367.521367521,
                "amount": "0.0936",
                "total": "2000",
                "initialRate": 21367.521367521,
                "initialAmount": "0.0936",
                "filledRate": 0,
                "filledAmount": 0,
                "currencyPair": "eth_btc",
                "timestamp": "1407828913",
                "status": "open"
                }
            ]
        }

返回值说明

    amount: 剩余未成交数量
    currencyPair: 订单交易对
    filledAmount: 已成交量
    filledRate: 成交价格
    initialAmount: 下单量
    initialRate:下单价格
    orderNumber: 订单号
    rate:交易单价
    status: 记录状态 DONE:完成; CANCEL:取消; REQUEST:请求中
    timestamp: 时间戳
    total2    type: 买卖类型 buy:买入;sell:卖出

获取我的最近100条成交记录API

API URL: https://api.gateio.la/api2/1/private/tradeHistory

参数数据提交方式:POST

返回数据格式:JSON

参数:

参数名 参数类型 必填 描述
currencyPair String 交易币种对
orderNumber String 订单号

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/tradeHistory
    # Response
    {
        "result": "true",
        "message": "Success",
        "trades": [
                {
                "id": "7942422",
                "orderid": "38100491",
                "pair": "ltc_btc",
                "type": "buy",
                "rate": "0.01719",
                "amount": "0.0588",
                "time": "06-12 02:49:11",
                "time_unix": "1402512551"
                }
            ]
    }

返回值说明

    orderid: 订单id
    pair: 交易对
    type: 买卖类型
    rate: 买卖价格
    amount: 订单买卖币种数量
    time: 订单时间
    time_unix: 订单unix时间戳

提现API

API URL: https://api.gateio.la/api2/1/private/withdraw

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
currency String 提现币种(如: btc)
amount String 提现数量
address String 地址(如果需要转账memo等备注信息,可以放在收款地址后面,空格隔开)
chain String 链名称

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/withdraw
    # Response
    { "result": "true",  "message": "Success"}

返回值说明

    result: 是否成功 true成功 false失败
    message: 提示消息

取消提现API

API URL: https://api.gateio.la/api2/1/private/withdraw_cancel

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
withdraw_id Int TXID

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/withdraw_cancel
    # Response
    { "result": "true",  "message": "Success"}

返回值说明

    result: 是否成功 true成功 false失败
    message: 提示消息

子账号API

查询单个子账号余额

API URL: https://api.gateio.la/api2/1/private/get_sub_account_available

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
sub_uid Int 子账号 ID

示例:

        # Request
        POST: https://api.gateio.la/api2/1/private/get_sub_account_available
        # Response
        {
            "result": true,
            "available": {
                "uid": "XXX",
                "BTC": "0.1",
                "USDT": "0",
                "GT": "0"
            }
        }
    

查询所有子账号余额

API URL: https://api.gateio.la/api2/1/private/get_sub_account_available

返回数据格式:JSON

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/get_sub_account_available
    # Response
        {
            "result": true,
            "available": [{
                "uid": "XXX",
                "BTC": "0.1",
                "USDT": "0",
                "GT": "0"
                }, {
                    "uid": "XXX",
                    "USDT": "94.70916"
                }]
        }
    

子账号资金划转

API URL: https://api.gateio.la/api2/1/private/sub_account_transfer

参数数据提交方式:POST

返回数据格式:JSON

请求参数

参数名 参数类型 必填 描述
sub_uid Int 子账号 ID
transfer_type String 划转类型 in为从主账号转到子账号,out为从子账号转到主账号
coin String 币种
amount String 数量

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/sub_account_transfer
    # Response
    {
	"result": "true",
	"message": "Success"
    }
    

返回值说明

    result: 是否成功 true成功 false失败
    message: 提示消息

费率标准

返回所有系统支持的币种费率标准信息,包括充值、提现、交易状态等。

URL: https://api.gateio.la/api2/1/private/feelist

示例:

    # Request
    POST: https://api.gateio.la/api2/1/private/feelist
    # Response
    {
        "GT":{
                "no":149,
                "symbol":"GT",
                "name":"GatechainToken",
                "name_cn":"GateChain",
                "fee_usdt":"0.2%",
                "fee_btc":"0.2%",
                "fee_eth":"-",
                "deposit":"0",
                "withdraw_percent":"0%",
                "withdraw_fix":"0.1",
                "withdraw_day_limit":"500000",
                "withdraw_amount_mini": 0.2,
                "withdraw_day_limit_remain": 500000,
                "withdraw_eachtime_limit": 500000,
                "withdraw_fix_on_chain_ETH": 4
             },
        "USDT":{
                "no":3,
                "symbol":"USDT",
                "name":"Tether",
                "name_cn":"Tether",
                "fee_usdt":"-",
                "fee_btc":"0.2%",
                "fee_eth":"0.2%",
                "deposit":"0",
                "withdraw_percent":"0%",
                "withdraw_fix":"3",
                "withdraw_day_limit":"300000",
                "withdraw_amount_mini": 53,
                "withdraw_day_limit_remain": 300000,
                "withdraw_eachtime_limit": 1000000,
                "usdt_erc20_withdraw_txfee": 10.0,
                "usdt_trc20_withdraw_txfee": 0.1,
                "withdraw_fix_on_chain_BTC":20,
                "withdraw_fix_on_chain_ETH":15,
                "withdraw_fix_on_chain_TRX":0,
                "withdraw_fix_on_chain_EOS":2.5
             },...
   }
            

返回值说明

    no:序号
    symbol:币种
    name:币种
    name_cn:币种
    fee_usdt:对USDT 交易费
    fee_btc:对BTC 交易费
    fee_eth:对ETH 交易费
    deposit:充值手续费
    withdraw_percent:提现手续费
    withdraw_fix:提现手续费
    withdraw_day_limit:日提现额度(可提高)
    withdraw_amount_mini:最少
    withdraw_day_limit_remain:剩余时间
    withdraw_eachtime_limit:一次最多
    withdraw_fix_on_chain_ETH: 提现手续费			

公告

本站公告

URL: https://api.gateio.la/api2/1/annlist?page=1&lang=cn

请求参数

参数名 参数类型 必填 描述
page Int 页码,取值从1开始(1-1000)
lang string 语言: cn (简体中文), kr (한국어), en (English), vn (Tiếng Việt), tw (繁体中文), es (Español), ru (Русский язык), fr (Français), th (ภาษาไทย)

示例:

    # Request
    GET: https://api.gateio.la/api2/1/annlist?page=1
    # Response
        {
            "result": true,
            "message":"Success",
            "page":3,
            "data":[
                {
                    "id":"1",
                    "title":"test title 1",
                    "brief":"test brief 1",
                    "updated_t":"2020-06-02 11:59:04"
                },
                {
                    "id":"2",
                    "title":"test title 2",
                    "brief":"test brief 2",
                    "updated_t":"2020-06-02 11:59:04"
                }
            ]
        }
            

返回值说明

    id:序号
    title:标题
    brief:详情
    updated_t:更新时间			

错误代码说明

系统返回错误码对应说明

错误代码 详情
1 无效请求
2 无效版本
3 无效请求
4 没有访问权限
5,6 Key或签名无效,请重新创建
7 币种对不支持
8,9 币种不支持
10 验证错误
11 地址获取失败
12 参数为空
13 系统错误,联系管理员
14 无效用户
15 撤单太频繁,一分钟后再试
16 无效单号,或挂单已撤销
17 无效单号
18 无效挂单量
19 交易已暂停
20 挂单量太小
21 资金不足
24 无效币种
40 请求太频繁,稍后再试
102 提现暂停
1401 子账号ID无效或不存在
1402 子账号不能资金划转
1403 无效参数
1404 子账号资金划转失败
1405 子账号已冻结

示例程序

PHP示例程序 (更多参考:JAVA, NODEJS, PYTHON, GO, PHP, CSHARP, PERL )

					

	<?php

		function gateio_query($path, array $req = array()) {
			// API settings, add your Key and Secret at here
			$key = '';
			$secret = '';

			// generate a nonce to avoid problems with 32bits systems
			$mt = explode(' ', microtime());
			$req['nonce'] = $mt[1].substr($mt[0], 2, 6);

			// generate the POST data string
			$post_data = http_build_query($req, '', '&');
			$sign = hash_hmac('sha512', urldecode($post_data), $secret);

			// generate the extra headers
			$headers = array(
				'KEY: '.$key,
				'SIGN: '.$sign
			);

			//!!! please set Content-Type to application/x-www-form-urlencoded if it's not the default value

			// curl handle (initialize if required)
			static $ch = null;
			if (is_null($ch)) {
				$ch = curl_init();
				curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
				curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; gateio PHP bot; '.php_uname('a').'; PHP/'.phpversion().')');
			}

			curl_setopt($ch, CURLOPT_URL, 'https://api.gateio.la/api2/'.$path);
			curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
			curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);


			// run the query
			$res = curl_exec($ch);

			if ($res === false) throw new Exception('Could not get reply: '.curl_error($ch));
			//var_dump($res);
			//print_r($res);
			$dec = json_decode($res, true);
			if (!$dec) throw new Exception('Invalid data received, please make sure connection is working and requested API exists: '.$res);

			return $dec;
		}


		function curl_file_get_contents($url) {

			// our curl handle (initialize if required)
			static $ch = null;
			if (is_null($ch)) {
				$ch = curl_init();
				curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
				curl_setopt($ch, CURLOPT_USERAGENT,
					'Mozilla/4.0 (compatible; gateio PHP bot; '.php_uname('a').'; PHP/'.phpversion().')'
					);
			}
			curl_setopt($ch, CURLOPT_URL, 'https://data.gateapi.io/api2/'.$url);
			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

			// run the query
			$res = curl_exec($ch);
			if ($res === false) throw new Exception('Could not get reply: '.curl_error($ch));
			//echo $res;
			$dec = json_decode($res, true);
			if (!$dec) throw new Exception('Invalid data: '.$res);

			return $dec;
		}

		function get_top_rate($currency_pair, $type='BUY') {

			$url = '1/orderBook/'.strtoupper($currency_pair);
			$json = curl_file_get_contents($url);

			$rate = 0;

			if (strtoupper($type) == 'BUY') {
				$r =  $json['bids'][0];
				$rate = $r[0];
			} else  {
				$r = end($json['asks']);
				$rate = $r[0];
			}

			return $rate;
		}

		function get_pairs() {

			$url = '1/pairs';
			$json = curl_file_get_contents($url);

			return $json;
		}

		function get_marketinfo(){

			$url = '1/marketinfo';
			$json = curl_file_get_contents($url);

			return $json;
		}

		function get_tickers(){

			$url = '1/tickers';
			$json = curl_file_get_contents($url);

			return $json;
		}

		function get_ticker($current_pairs){

			$url = '1/ticker/'.strtoupper($current_pairs);
			$json = curl_file_get_contents($url);

			return $json;
		}

		function get_orderbooks(){

			$url = '1/orderBooks';
			$json = curl_file_get_contents($url);

			return $json;
		}

		function get_orderbook($current_pairs){

			$url = '1/orderBook/'.strtoupper($current_pairs);
			$json = curl_file_get_contents($url);

			return $json;
		}

		function get_trade_history($current_pairs, $tid){

			$url = '1/tradeHistory/'.strtoupper($current_pairs).'/'.$tid;
			$json = curl_file_get_contents($url);

			return $json;
		}

		function get_balances() {

			return gateio_query('1/private/balances');
		}

		function withdraw($currency, $amount, $address) {

			return gateio_query('1/private/withdraw',
				array(
					'currency' => strtoupper($currency),
					'amount' => $amount,
					'address' => $address
				)
			);
		}

		function get_order($order_number, $currency_pair) {

			return gateio_query('1/private/getOrder',
				array(
					'currencyPair' => strtoupper($currency_pair),
					'orderNumber' => $order_number
				)
			);
		}

		function cancel_order($order_number, $currency_pair) {

			return gateio_query('1/private/cancelOrder',
				array(
					'currencyPair' => strtoupper($currency_pair),
					'orderNumber' => $order_number
				)
			);
		}

		function cancel_all_orders($type, $currency_pair) {

			return gateio_query('1/private/cancelAllOrders',
				array(
					'type' => $type,
					'currencyPair' => strtoupper($currency_pair)
				)
			);
		}

		function sell($currency_pair, $rate, $amount) {

			return gateio_query('1/private/sell',
				array(
					'currencyPair' => strtoupper($currency_pair),
					'rate' => $rate,
					'amount' => $amount,
				)
			);
		}

		function buy($currency_pair, $rate, $amount) {

			return gateio_query('1/private/buy',
				array(
					'currencyPair' => strtoupper($currency_pair),
					'rate' => $rate,
					'amount' => $amount,
				)
			);
		}

		function get_my_trade_history($currency_pair, $order_number) {

			return gateio_query('1/private/tradeHistory',
				array(
					'currencyPair' => strtoupper($currency_pair),
					'orderNumber' => $order_number
				)
			);
		}

		function open_orders() {

			return gateio_query('1/private/openOrders');
		}

		function deposit_address($currency) {

			return gateio_query('1/private/depositAddress',
				array(
					'currency' => strtoupper($currency)
				)
			);
		}


		try {
			// example 1: get balances
			var_dump(get_balances());

			// example 2: place a buy order
			$pair = 'ltc_btc';
			$rate = get_top_rate($pair, $type) * 1.01;
			var_dump(buy($pair, $rate, '0.01'));

			// example 3: cancel an order
			var_dump(cancel_order(125811, $pair));

			// example 4: get order status
			var_dump(get_order(15088, $pair));

			// example 5: list all open orders
			var_dump(open_orders());

		} catch (Exception $e) {
			echo "Error:".$e->getMessage();

		}
	?>
					

					

语言及地区
汇率

选择语言及地区

前往土耳其站点?
土耳其站已上线
可点击前往TR分站,或是继续留在国际站