Markets

Index


Trading Pairs API

Return all the trading pairs supported by Bter

URL: http://data.bter.com/api/1/pairs


Market Info API

Returns all markets' fee, minimum order total amount, price decimal places.

URL: http://data.bter.com/api/1/marketinfo


Market Details API

Returns market details including pair, coin name, coin symbol, last price, trading volume, coin supply, coin market cap, price trend, etc.

URL: http://data.bter.com/api/1/markelist


Tickers API

returns the tickers for all the supported trading pairs at once, cached in 10 seconds::

URL: http://data.bter.com/api/1/tickers


Ticker API

returns the current ticker for the selected currency, cached in 10 seconds:

URL: http://data.bter.com/api/1/ticker/[CURR_A]_[CURR_B]

Replace [CURR_A] and [CURR_B] with the selected currencies.

Links:

http://data.bter.com/api/1/ticker/btc_cny
http://data.bter.com/api/1/ticker/ltc_cny
http://data.bter.com/api/1/ticker/blk_cny
http://data.bter.com/api/1/ticker/bitcny_cny
http://data.bter.com/api/1/ticker/bqc_cny
http://data.bter.com/api/1/ticker/btb_cny
http://data.bter.com/api/1/ticker/btq_cny
http://data.bter.com/api/1/ticker/bts_cny
http://data.bter.com/api/1/ticker/cent_cny
http://data.bter.com/api/1/ticker/cmc_cny
http://data.bter.com/api/1/ticker/cnc_cny
http://data.bter.com/api/1/ticker/dgc_cny
http://data.bter.com/api/1/ticker/doge_cny
http://data.bter.com/api/1/ticker/dash_cny
http://data.bter.com/api/1/ticker/dtc_cny
http://data.bter.com/api/1/ticker/dvc_cny
http://data.bter.com/api/1/ticker/exc_cny
http://data.bter.com/api/1/ticker/ftc_cny
http://data.bter.com/api/1/ticker/frc_cny
http://data.bter.com/api/1/ticker/ifc_cny
http://data.bter.com/api/1/ticker/max_cny
http://data.bter.com/api/1/ticker/mec_cny
http://data.bter.com/api/1/ticker/mint_cny
http://data.bter.com/api/1/ticker/mmc_cny
http://data.bter.com/api/1/ticker/nbt_cny
http://data.bter.com/api/1/ticker/net_cny
http://data.bter.com/api/1/ticker/nmc_cny
http://data.bter.com/api/1/ticker/nxt_cny
http://data.bter.com/api/1/ticker/ppc_cny
http://data.bter.com/api/1/ticker/pts_cny
http://data.bter.com/api/1/ticker/qrk_cny
http://data.bter.com/api/1/ticker/red_cny
http://data.bter.com/api/1/ticker/shell_cny
http://data.bter.com/api/1/ticker/src_cny
http://data.bter.com/api/1/ticker/tag_cny
http://data.bter.com/api/1/ticker/tips_cny
http://data.bter.com/api/1/ticker/tix_cny
http://data.bter.com/api/1/ticker/vrc_cny
http://data.bter.com/api/1/ticker/vtc_cny
http://data.bter.com/api/1/ticker/wdc_cny
http://data.bter.com/api/1/ticker/xcp_cny
http://data.bter.com/api/1/ticker/xmr_cny
http://data.bter.com/api/1/ticker/xpm_cny
http://data.bter.com/api/1/ticker/xtc_cny
http://data.bter.com/api/1/ticker/yac_cny
http://data.bter.com/api/1/ticker/zcc_cny
http://data.bter.com/api/1/ticker/zet_cny
http://data.bter.com/api/1/ticker/btc_usd
http://data.bter.com/api/1/ticker/bitusd_usd
http://data.bter.com/api/1/ticker/ltc_usd
http://data.bter.com/api/1/ticker/doge_usd
http://data.bter.com/api/1/ticker/dash_usd
http://data.bter.com/api/1/ticker/nxt_usd
http://data.bter.com/api/1/ticker/xcp_usd
http://data.bter.com/api/1/ticker/bts_usd
http://data.bter.com/api/1/ticker/ltc_btc
http://data.bter.com/api/1/ticker/ac_btc
http://data.bter.com/api/1/ticker/arch_btc
http://data.bter.com/api/1/ticker/aur_btc
http://data.bter.com/api/1/ticker/bay_btc
http://data.bter.com/api/1/ticker/bbr_btc
http://data.bter.com/api/1/ticker/blk_btc
http://data.bter.com/api/1/ticker/bitgld_btc
http://data.bter.com/api/1/ticker/block_btc
http://data.bter.com/api/1/ticker/bqc_btc
http://data.bter.com/api/1/ticker/btb_btc
http://data.bter.com/api/1/ticker/btcd_btc
http://data.bter.com/api/1/ticker/bts_btc
http://data.bter.com/api/1/ticker/buk_btc
http://data.bter.com/api/1/ticker/c2_btc
http://data.bter.com/api/1/ticker/cdc_btc
http://data.bter.com/api/1/ticker/ckc_btc
http://data.bter.com/api/1/ticker/comm_btc
http://data.bter.com/api/1/ticker/cmc_btc
http://data.bter.com/api/1/ticker/cnc_btc
http://data.bter.com/api/1/ticker/dgc_btc
http://data.bter.com/api/1/ticker/doge_btc
http://data.bter.com/api/1/ticker/dns_btc
http://data.bter.com/api/1/ticker/dash_btc
http://data.bter.com/api/1/ticker/drkc_btc
http://data.bter.com/api/1/ticker/dtc_btc
http://data.bter.com/api/1/ticker/exc_btc
http://data.bter.com/api/1/ticker/flt_btc
http://data.bter.com/api/1/ticker/frc_btc
http://data.bter.com/api/1/ticker/frsh_btc
http://data.bter.com/api/1/ticker/ftc_btc
http://data.bter.com/api/1/ticker/gemz_btc
http://data.bter.com/api/1/ticker/ghost_btc
http://data.bter.com/api/1/ticker/gml_btc
http://data.bter.com/api/1/ticker/kdc_btc
http://data.bter.com/api/1/ticker/lts_btc
http://data.bter.com/api/1/ticker/max_btc
http://data.bter.com/api/1/ticker/mec_btc
http://data.bter.com/api/1/ticker/mint_btc
http://data.bter.com/api/1/ticker/mmc_btc
http://data.bter.com/api/1/ticker/msc_btc
http://data.bter.com/api/1/ticker/nav_btc
http://data.bter.com/api/1/ticker/nbt_btc
http://data.bter.com/api/1/ticker/nsr_btc
http://data.bter.com/api/1/ticker/nec_btc
http://data.bter.com/api/1/ticker/nmc_btc
http://data.bter.com/api/1/ticker/node_btc
http://data.bter.com/api/1/ticker/nas_btc
http://data.bter.com/api/1/ticker/net_btc
http://data.bter.com/api/1/ticker/nfd_btc
http://data.bter.com/api/1/ticker/nxt_btc
http://data.bter.com/api/1/ticker/ntx_btc
http://data.bter.com/api/1/ticker/ppc_btc
http://data.bter.com/api/1/ticker/prt_btc
http://data.bter.com/api/1/ticker/pts_btc
http://data.bter.com/api/1/ticker/qrk_btc
http://data.bter.com/api/1/ticker/rox_btc
http://data.bter.com/api/1/ticker/sfr_btc
http://data.bter.com/api/1/ticker/slm_btc
http://data.bter.com/api/1/ticker/spark_btc
http://data.bter.com/api/1/ticker/src_btc
http://data.bter.com/api/1/ticker/swift_btc
http://data.bter.com/api/1/ticker/tag_btc
http://data.bter.com/api/1/ticker/xtc_btc
http://data.bter.com/api/1/ticker/yac_btc
http://data.bter.com/api/1/ticker/via_btc
http://data.bter.com/api/1/ticker/vrc_btc
http://data.bter.com/api/1/ticker/vtc_btc
http://data.bter.com/api/1/ticker/wdc_btc
http://data.bter.com/api/1/ticker/xc_btc
http://data.bter.com/api/1/ticker/xch_btc
http://data.bter.com/api/1/ticker/xcn_btc
http://data.bter.com/api/1/ticker/xcr_btc
http://data.bter.com/api/1/ticker/xcp_btc
http://data.bter.com/api/1/ticker/xem_btc
http://data.bter.com/api/1/ticker/xpm_btc
http://data.bter.com/api/1/ticker/xmr_btc
http://data.bter.com/api/1/ticker/qora_btc
http://data.bter.com/api/1/ticker/zcc_btc
http://data.bter.com/api/1/ticker/zet_btc
http://data.bter.com/api/1/ticker/cent_ltc
http://data.bter.com/api/1/ticker/dvc_ltc
http://data.bter.com/api/1/ticker/ifc_ltc
http://data.bter.com/api/1/ticker/net_ltc
http://data.bter.com/api/1/ticker/nfd_ltc
http://data.bter.com/api/1/ticker/red_ltc
http://data.bter.com/api/1/ticker/tips_ltc
http://data.bter.com/api/1/ticker/tix_ltc
http://data.bter.com/api/1/ticker/bts_nxt
http://data.bter.com/api/1/ticker/xcp_nxt
http://data.bter.com/api/1/ticker/btcd_nxt
http://data.bter.com/api/1/ticker/btc_bitusd
http://data.bter.com/api/1/ticker/mgw_btc
http://data.bter.com/api/1/ticker/nxtty_btc
http://data.bter.com/api/1/ticker/atomic_btc
http://data.bter.com/api/1/ticker/mrkt_btc
http://data.bter.com/api/1/ticker/nxtty_cny
http://data.bter.com/api/1/ticker/token_btc
http://data.bter.com/api/1/ticker/token_nxt
http://data.bter.com/api/1/ticker/token_cny
http://data.bter.com/api/1/ticker/token_btcd
http://data.bter.com/api/1/ticker/unity_btc
http://data.bter.com/api/1/ticker/unity_nxt
http://data.bter.com/api/1/ticker/unity_cny
http://data.bter.com/api/1/ticker/dice_btc
http://data.bter.com/api/1/ticker/dice_nxt

Depth API

Return the market depth including ask and bid orders.

URL: http://data.bter.com/api/1/depth/[CURR_A]_[CURR_B]

Replace [CURR_A] and [CURR_B] with the selected currencies.

Links:

http://data.bter.com/api/1/depth/btc_cny
http://data.bter.com/api/1/depth/ltc_cny
http://data.bter.com/api/1/depth/blk_cny
http://data.bter.com/api/1/depth/bitcny_cny
http://data.bter.com/api/1/depth/bqc_cny
http://data.bter.com/api/1/depth/btb_cny
http://data.bter.com/api/1/depth/btq_cny
http://data.bter.com/api/1/depth/bts_cny
http://data.bter.com/api/1/depth/cent_cny
http://data.bter.com/api/1/depth/cmc_cny
http://data.bter.com/api/1/depth/cnc_cny
http://data.bter.com/api/1/depth/dgc_cny
http://data.bter.com/api/1/depth/doge_cny
http://data.bter.com/api/1/depth/dash_cny
http://data.bter.com/api/1/depth/dtc_cny
http://data.bter.com/api/1/depth/dvc_cny
http://data.bter.com/api/1/depth/exc_cny
http://data.bter.com/api/1/depth/ftc_cny
http://data.bter.com/api/1/depth/frc_cny
http://data.bter.com/api/1/depth/ifc_cny
http://data.bter.com/api/1/depth/max_cny
http://data.bter.com/api/1/depth/mec_cny
http://data.bter.com/api/1/depth/mint_cny
http://data.bter.com/api/1/depth/mmc_cny
http://data.bter.com/api/1/depth/nbt_cny
http://data.bter.com/api/1/depth/net_cny
http://data.bter.com/api/1/depth/nmc_cny
http://data.bter.com/api/1/depth/nxt_cny
http://data.bter.com/api/1/depth/ppc_cny
http://data.bter.com/api/1/depth/pts_cny
http://data.bter.com/api/1/depth/qrk_cny
http://data.bter.com/api/1/depth/red_cny
http://data.bter.com/api/1/depth/shell_cny
http://data.bter.com/api/1/depth/src_cny
http://data.bter.com/api/1/depth/tag_cny
http://data.bter.com/api/1/depth/tips_cny
http://data.bter.com/api/1/depth/tix_cny
http://data.bter.com/api/1/depth/vrc_cny
http://data.bter.com/api/1/depth/vtc_cny
http://data.bter.com/api/1/depth/wdc_cny
http://data.bter.com/api/1/depth/xcp_cny
http://data.bter.com/api/1/depth/xmr_cny
http://data.bter.com/api/1/depth/xpm_cny
http://data.bter.com/api/1/depth/xtc_cny
http://data.bter.com/api/1/depth/yac_cny
http://data.bter.com/api/1/depth/zcc_cny
http://data.bter.com/api/1/depth/zet_cny
http://data.bter.com/api/1/depth/btc_usd
http://data.bter.com/api/1/depth/bitusd_usd
http://data.bter.com/api/1/depth/ltc_usd
http://data.bter.com/api/1/depth/doge_usd
http://data.bter.com/api/1/depth/dash_usd
http://data.bter.com/api/1/depth/nxt_usd
http://data.bter.com/api/1/depth/xcp_usd
http://data.bter.com/api/1/depth/bts_usd
http://data.bter.com/api/1/depth/ltc_btc
http://data.bter.com/api/1/depth/ac_btc
http://data.bter.com/api/1/depth/arch_btc
http://data.bter.com/api/1/depth/aur_btc
http://data.bter.com/api/1/depth/bay_btc
http://data.bter.com/api/1/depth/bbr_btc
http://data.bter.com/api/1/depth/blk_btc
http://data.bter.com/api/1/depth/bitgld_btc
http://data.bter.com/api/1/depth/block_btc
http://data.bter.com/api/1/depth/bqc_btc
http://data.bter.com/api/1/depth/btb_btc
http://data.bter.com/api/1/depth/btcd_btc
http://data.bter.com/api/1/depth/bts_btc
http://data.bter.com/api/1/depth/buk_btc
http://data.bter.com/api/1/depth/c2_btc
http://data.bter.com/api/1/depth/cdc_btc
http://data.bter.com/api/1/depth/ckc_btc
http://data.bter.com/api/1/depth/comm_btc
http://data.bter.com/api/1/depth/cmc_btc
http://data.bter.com/api/1/depth/cnc_btc
http://data.bter.com/api/1/depth/dgc_btc
http://data.bter.com/api/1/depth/doge_btc
http://data.bter.com/api/1/depth/dns_btc
http://data.bter.com/api/1/depth/dash_btc
http://data.bter.com/api/1/depth/drkc_btc
http://data.bter.com/api/1/depth/dtc_btc
http://data.bter.com/api/1/depth/exc_btc
http://data.bter.com/api/1/depth/flt_btc
http://data.bter.com/api/1/depth/frc_btc
http://data.bter.com/api/1/depth/frsh_btc
http://data.bter.com/api/1/depth/ftc_btc
http://data.bter.com/api/1/depth/gemz_btc
http://data.bter.com/api/1/depth/ghost_btc
http://data.bter.com/api/1/depth/gml_btc
http://data.bter.com/api/1/depth/kdc_btc
http://data.bter.com/api/1/depth/lts_btc
http://data.bter.com/api/1/depth/max_btc
http://data.bter.com/api/1/depth/mec_btc
http://data.bter.com/api/1/depth/mint_btc
http://data.bter.com/api/1/depth/mmc_btc
http://data.bter.com/api/1/depth/msc_btc
http://data.bter.com/api/1/depth/nav_btc
http://data.bter.com/api/1/depth/nbt_btc
http://data.bter.com/api/1/depth/nsr_btc
http://data.bter.com/api/1/depth/nec_btc
http://data.bter.com/api/1/depth/nmc_btc
http://data.bter.com/api/1/depth/node_btc
http://data.bter.com/api/1/depth/nas_btc
http://data.bter.com/api/1/depth/net_btc
http://data.bter.com/api/1/depth/nfd_btc
http://data.bter.com/api/1/depth/nxt_btc
http://data.bter.com/api/1/depth/ntx_btc
http://data.bter.com/api/1/depth/ppc_btc
http://data.bter.com/api/1/depth/prt_btc
http://data.bter.com/api/1/depth/pts_btc
http://data.bter.com/api/1/depth/qrk_btc
http://data.bter.com/api/1/depth/rox_btc
http://data.bter.com/api/1/depth/sfr_btc
http://data.bter.com/api/1/depth/slm_btc
http://data.bter.com/api/1/depth/spark_btc
http://data.bter.com/api/1/depth/src_btc
http://data.bter.com/api/1/depth/swift_btc
http://data.bter.com/api/1/depth/tag_btc
http://data.bter.com/api/1/depth/xtc_btc
http://data.bter.com/api/1/depth/yac_btc
http://data.bter.com/api/1/depth/via_btc
http://data.bter.com/api/1/depth/vrc_btc
http://data.bter.com/api/1/depth/vtc_btc
http://data.bter.com/api/1/depth/wdc_btc
http://data.bter.com/api/1/depth/xc_btc
http://data.bter.com/api/1/depth/xch_btc
http://data.bter.com/api/1/depth/xcn_btc
http://data.bter.com/api/1/depth/xcr_btc
http://data.bter.com/api/1/depth/xcp_btc
http://data.bter.com/api/1/depth/xem_btc
http://data.bter.com/api/1/depth/xpm_btc
http://data.bter.com/api/1/depth/xmr_btc
http://data.bter.com/api/1/depth/qora_btc
http://data.bter.com/api/1/depth/zcc_btc
http://data.bter.com/api/1/depth/zet_btc
http://data.bter.com/api/1/depth/cent_ltc
http://data.bter.com/api/1/depth/dvc_ltc
http://data.bter.com/api/1/depth/ifc_ltc
http://data.bter.com/api/1/depth/net_ltc
http://data.bter.com/api/1/depth/nfd_ltc
http://data.bter.com/api/1/depth/red_ltc
http://data.bter.com/api/1/depth/tips_ltc
http://data.bter.com/api/1/depth/tix_ltc
http://data.bter.com/api/1/depth/bts_nxt
http://data.bter.com/api/1/depth/xcp_nxt
http://data.bter.com/api/1/depth/btcd_nxt
http://data.bter.com/api/1/depth/btc_bitusd
http://data.bter.com/api/1/depth/mgw_btc
http://data.bter.com/api/1/depth/nxtty_btc
http://data.bter.com/api/1/depth/atomic_btc
http://data.bter.com/api/1/depth/mrkt_btc
http://data.bter.com/api/1/depth/nxtty_cny
http://data.bter.com/api/1/depth/token_btc
http://data.bter.com/api/1/depth/token_nxt
http://data.bter.com/api/1/depth/token_cny
http://data.bter.com/api/1/depth/token_btcd
http://data.bter.com/api/1/depth/unity_btc
http://data.bter.com/api/1/depth/unity_nxt
http://data.bter.com/api/1/depth/unity_cny
http://data.bter.com/api/1/depth/dice_btc
http://data.bter.com/api/1/depth/dice_nxt

Trade History API

Return the most recent 80 trade history records:

URL: http://data.bter.com/api/1/trade/[CURR_A]_[CURR_B]

Return at most 1,000 trade history records after [TID]:

URL: http://data.bter.com/api/1/trade/[CURR_A]_[CURR_B]/[TID]

Replace [CURR_A] and [CURR_B] with the selected currencies.

Links:

http://data.bter.com/api/1/trade/btc_cny
http://data.bter.com/api/1/trade/ltc_cny
http://data.bter.com/api/1/trade/blk_cny
http://data.bter.com/api/1/trade/bitcny_cny
http://data.bter.com/api/1/trade/bqc_cny
http://data.bter.com/api/1/trade/btb_cny
http://data.bter.com/api/1/trade/btq_cny
http://data.bter.com/api/1/trade/bts_cny
http://data.bter.com/api/1/trade/cent_cny
http://data.bter.com/api/1/trade/cmc_cny
http://data.bter.com/api/1/trade/cnc_cny
http://data.bter.com/api/1/trade/dgc_cny
http://data.bter.com/api/1/trade/doge_cny
http://data.bter.com/api/1/trade/dash_cny
http://data.bter.com/api/1/trade/dtc_cny
http://data.bter.com/api/1/trade/dvc_cny
http://data.bter.com/api/1/trade/exc_cny
http://data.bter.com/api/1/trade/ftc_cny
http://data.bter.com/api/1/trade/frc_cny
http://data.bter.com/api/1/trade/ifc_cny
http://data.bter.com/api/1/trade/max_cny
http://data.bter.com/api/1/trade/mec_cny
http://data.bter.com/api/1/trade/mint_cny
http://data.bter.com/api/1/trade/mmc_cny
http://data.bter.com/api/1/trade/nbt_cny
http://data.bter.com/api/1/trade/net_cny
http://data.bter.com/api/1/trade/nmc_cny
http://data.bter.com/api/1/trade/nxt_cny
http://data.bter.com/api/1/trade/ppc_cny
http://data.bter.com/api/1/trade/pts_cny
http://data.bter.com/api/1/trade/qrk_cny
http://data.bter.com/api/1/trade/red_cny
http://data.bter.com/api/1/trade/shell_cny
http://data.bter.com/api/1/trade/src_cny
http://data.bter.com/api/1/trade/tag_cny
http://data.bter.com/api/1/trade/tips_cny
http://data.bter.com/api/1/trade/tix_cny
http://data.bter.com/api/1/trade/vrc_cny
http://data.bter.com/api/1/trade/vtc_cny
http://data.bter.com/api/1/trade/wdc_cny
http://data.bter.com/api/1/trade/xcp_cny
http://data.bter.com/api/1/trade/xmr_cny
http://data.bter.com/api/1/trade/xpm_cny
http://data.bter.com/api/1/trade/xtc_cny
http://data.bter.com/api/1/trade/yac_cny
http://data.bter.com/api/1/trade/zcc_cny
http://data.bter.com/api/1/trade/zet_cny
http://data.bter.com/api/1/trade/btc_usd
http://data.bter.com/api/1/trade/bitusd_usd
http://data.bter.com/api/1/trade/ltc_usd
http://data.bter.com/api/1/trade/doge_usd
http://data.bter.com/api/1/trade/dash_usd
http://data.bter.com/api/1/trade/nxt_usd
http://data.bter.com/api/1/trade/xcp_usd
http://data.bter.com/api/1/trade/bts_usd
http://data.bter.com/api/1/trade/ltc_btc
http://data.bter.com/api/1/trade/ac_btc
http://data.bter.com/api/1/trade/arch_btc
http://data.bter.com/api/1/trade/aur_btc
http://data.bter.com/api/1/trade/bay_btc
http://data.bter.com/api/1/trade/bbr_btc
http://data.bter.com/api/1/trade/blk_btc
http://data.bter.com/api/1/trade/bitgld_btc
http://data.bter.com/api/1/trade/block_btc
http://data.bter.com/api/1/trade/bqc_btc
http://data.bter.com/api/1/trade/btb_btc
http://data.bter.com/api/1/trade/btcd_btc
http://data.bter.com/api/1/trade/bts_btc
http://data.bter.com/api/1/trade/buk_btc
http://data.bter.com/api/1/trade/c2_btc
http://data.bter.com/api/1/trade/cdc_btc
http://data.bter.com/api/1/trade/ckc_btc
http://data.bter.com/api/1/trade/comm_btc
http://data.bter.com/api/1/trade/cmc_btc
http://data.bter.com/api/1/trade/cnc_btc
http://data.bter.com/api/1/trade/dgc_btc
http://data.bter.com/api/1/trade/doge_btc
http://data.bter.com/api/1/trade/dns_btc
http://data.bter.com/api/1/trade/dash_btc
http://data.bter.com/api/1/trade/drkc_btc
http://data.bter.com/api/1/trade/dtc_btc
http://data.bter.com/api/1/trade/exc_btc
http://data.bter.com/api/1/trade/flt_btc
http://data.bter.com/api/1/trade/frc_btc
http://data.bter.com/api/1/trade/frsh_btc
http://data.bter.com/api/1/trade/ftc_btc
http://data.bter.com/api/1/trade/gemz_btc
http://data.bter.com/api/1/trade/ghost_btc
http://data.bter.com/api/1/trade/gml_btc
http://data.bter.com/api/1/trade/kdc_btc
http://data.bter.com/api/1/trade/lts_btc
http://data.bter.com/api/1/trade/max_btc
http://data.bter.com/api/1/trade/mec_btc
http://data.bter.com/api/1/trade/mint_btc
http://data.bter.com/api/1/trade/mmc_btc
http://data.bter.com/api/1/trade/msc_btc
http://data.bter.com/api/1/trade/nav_btc
http://data.bter.com/api/1/trade/nbt_btc
http://data.bter.com/api/1/trade/nsr_btc
http://data.bter.com/api/1/trade/nec_btc
http://data.bter.com/api/1/trade/nmc_btc
http://data.bter.com/api/1/trade/node_btc
http://data.bter.com/api/1/trade/nas_btc
http://data.bter.com/api/1/trade/net_btc
http://data.bter.com/api/1/trade/nfd_btc
http://data.bter.com/api/1/trade/nxt_btc
http://data.bter.com/api/1/trade/ntx_btc
http://data.bter.com/api/1/trade/ppc_btc
http://data.bter.com/api/1/trade/prt_btc
http://data.bter.com/api/1/trade/pts_btc
http://data.bter.com/api/1/trade/qrk_btc
http://data.bter.com/api/1/trade/rox_btc
http://data.bter.com/api/1/trade/sfr_btc
http://data.bter.com/api/1/trade/slm_btc
http://data.bter.com/api/1/trade/spark_btc
http://data.bter.com/api/1/trade/src_btc
http://data.bter.com/api/1/trade/swift_btc
http://data.bter.com/api/1/trade/tag_btc
http://data.bter.com/api/1/trade/xtc_btc
http://data.bter.com/api/1/trade/yac_btc
http://data.bter.com/api/1/trade/via_btc
http://data.bter.com/api/1/trade/vrc_btc
http://data.bter.com/api/1/trade/vtc_btc
http://data.bter.com/api/1/trade/wdc_btc
http://data.bter.com/api/1/trade/xc_btc
http://data.bter.com/api/1/trade/xch_btc
http://data.bter.com/api/1/trade/xcn_btc
http://data.bter.com/api/1/trade/xcr_btc
http://data.bter.com/api/1/trade/xcp_btc
http://data.bter.com/api/1/trade/xem_btc
http://data.bter.com/api/1/trade/xpm_btc
http://data.bter.com/api/1/trade/xmr_btc
http://data.bter.com/api/1/trade/qora_btc
http://data.bter.com/api/1/trade/zcc_btc
http://data.bter.com/api/1/trade/zet_btc
http://data.bter.com/api/1/trade/cent_ltc
http://data.bter.com/api/1/trade/dvc_ltc
http://data.bter.com/api/1/trade/ifc_ltc
http://data.bter.com/api/1/trade/net_ltc
http://data.bter.com/api/1/trade/nfd_ltc
http://data.bter.com/api/1/trade/red_ltc
http://data.bter.com/api/1/trade/tips_ltc
http://data.bter.com/api/1/trade/tix_ltc
http://data.bter.com/api/1/trade/bts_nxt
http://data.bter.com/api/1/trade/xcp_nxt
http://data.bter.com/api/1/trade/btcd_nxt
http://data.bter.com/api/1/trade/btc_bitusd
http://data.bter.com/api/1/trade/mgw_btc
http://data.bter.com/api/1/trade/nxtty_btc
http://data.bter.com/api/1/trade/atomic_btc
http://data.bter.com/api/1/trade/mrkt_btc
http://data.bter.com/api/1/trade/nxtty_cny
http://data.bter.com/api/1/trade/token_btc
http://data.bter.com/api/1/trade/token_nxt
http://data.bter.com/api/1/trade/token_cny
http://data.bter.com/api/1/trade/token_btcd
http://data.bter.com/api/1/trade/unity_btc
http://data.bter.com/api/1/trade/unity_nxt
http://data.bter.com/api/1/trade/unity_cny
http://data.bter.com/api/1/trade/dice_btc
http://data.bter.com/api/1/trade/dice_nxt


Trade API

The following APIs can be used for auto-trading in a program.
Notice: please set Content-Type to application/x-www-form-urlencoded in your HTTP request header if it's not the default value.

Click here to obtain a Key and Secret. Use the the Secret as a passphrase to sign the POST data in SHA512 encryption. Send the Key and Sign back in HTTPS Header for Authentication. Please refer to the following instructions and PHP example codes.

Get account fund balances API

API URL: https://bter.com/api/1/private/getfunds

Parameter submission method: POST

Parameter: None

Return data format: JSON

Return data example:

	{
		"result":"true",
		"available_funds":{
			"CNY":"1122.16",
			"BTC":"0.83337671",
			"LTC":"94.364",
			"YAC":"0.07161",
			"WDC":"82.35029899"
		},
		"locked_funds":{
			"BTC":"0.0002",
			"YAC":"10.01"
		}
	}
				


Place order API

API URL: https://bter.com/api/1/private/placeorder

Parameter submission method: POST

Parameter:

Parameter Description Example
pair currency pair ltc_btc
type trading type SELL or BUY
rate The rate to buy or sell 0.023
amount The amount to buy or sell 100

Return data format: JSON

Return data example:

	{
		"result":"true",
		"order_id":"123456",
		"msg":"Success"
	}
				

Notice: The returned order_id can be used for cancelling or getting order.


Cancel order API

API URL: https://bter.com/api/1/private/cancelorder

Parameter submission method: POST

Parameter:

Parameter Description Example
order_id Order ID 123456

Return data format: JSON

Return data example:

	{
		"result":"true",
		"msg":"Success"
	}
				


Get order status API

API URL: https://bter.com/api/1/private/getorder

Parameter submission method: POST

Parameter:

Parameter Description Example
order_id Order ID 123456

Return data format: JSON

Return data example:


	{
		"result":true,
		"order":{
			"id":"15088",
			"status":"cancelled",
			"pair":"btc_cny",
			"type":"sell",
			"rate":811,
			"amount":"0.39901357",
			"initial_rate":811,
			"initial_amount":"1"
		},
		"msg":"Success"
	}

				


Get my open order list API

API URL: https://bter.com/api/1/private/orderlist

Parameter submission method: POST

Parameter: None

Return data format: JSON

Return data example:


	{
		"result":true,
		"orders":[
			{
				"id":"15088",				
				"sell_type":"BTC",
				"buy_type":"LTC",				
				"sell_amount":"0.39901357",
				"buy_amount":"12.0",
				"pair":"ltc_btc",
				"type":"buy",
				"rate":0.033251,
				"amount":"0.39901357",
				"initial_rate":0.033251,
				"initial_amount":"1"
				"status":"open"
			},
			{
				"id":"15092",				
				"sell_type":"LTC",
				"buy_type":"BTC",				
				"sell_amount":"13.0",
				"buy_amount":"0.4210",
				"pair":"ltc_btc",
				"type":"buy",
				"rate":0.0323846,
				"amount":"0.4210",
				"initial_rate":0.0323846,
				"initial_amount":"1"
				"status":"open"
			}
			]
		"msg":"Success"
	}

				


Get my last 24h trades API

API URL: https://bter.com/api/1/private/mytrades

Parameter submission method: POST

Parameter:

Parameter Description Example
pair currency pair ltc_btc
order_id Order ID (optional) 626150

Return data format: JSON

Return data example:


	{
		"result":true,
		"trades":[
		    {
		      "id":"7942422"
		      "orderid":"38100777"
		      "pair":"ltc_btc"
		      "type":"sell"
		      "rate":"0.01719"
		      "amount":"0.0588"
		      "time":"06-12 02:49:11"
		      "time_unix":"1402512551"
		    }
		    {
		      "id":"7942422"
		      "orderid":"38100491"
		      "pair":"ltc_btc"
		      "type":"buy"
		      "rate":"0.01719"
		      "amount":"0.0588"
		      "time":"06-12 02:49:11"
		      "time_unix":"1402512551"
		    }
	  	]
	  	"msg":"Success"
	}


				


Example codes in PHP

				

<?php

	function bter_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', $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; Bter PHP bot; '.php_uname('a').'; PHP/'.phpversion().')'
				);
		}
		curl_setopt($ch, CURLOPT_URL, 'https://bter.com/api/'.$path);
		curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
		curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

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

		if ($res === false) throw new Exception('Curl error: '.curl_error($ch));
		//echo $res;
		$dec = json_decode($res, true);
		if (!$dec) throw new Exception('Invalid data: '.$res);
		return $dec;
	}
	 
	 function get_top_rate($pair, $type='BUY') {
		$rate = 0;

		// 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; Bter PHP bot; '.php_uname('a').'; PHP/'.phpversion().')'
				);
		}
		curl_setopt($ch, CURLOPT_URL, 'https://bter.com/api/1/depth/'.$pair);
		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);
		
		if (strtoupper($type) == 'BUY') {
			$r =  $dec['bids'][0];
			$rate = $r[0];
		} else  {
			$r = end($dec['asks']);
			$rate = $r[0];
		}

		return $rate;
	}


	try {
		// example 1: get funds
		var_dump(bter_query('1/private/getfunds'));
		
		// example 2: place a buy order
		$pair = 'ltc_btc';
		$type = 'buy';
		$rate = get_top_rate($pair, $type) * 1.01;
		var_dump(bter_query('1/private/placeorder', 
			array(
				'pair' => "$pair",
				'type' => "$type",
				'rate' => "$rate",
				'amount' => '0.01',
				)
			  )
			);
		
		// example 3: cancel an order
		var_dump(bter_query('1/private/cancelorder', array('order_id' => 125811)));
		
		// example 4: get order status
		var_dump(bter_query('1/private/getorder', array('order_id' => 15088)));

		//example 5: list all open orders
		var_dump(bter_query('1/private/orderlist'));
		
	} catch (Exception $e) {
		echo "Error:".$e->getMessage();
		
	} 
?>