Skip to content

Instantly share code, notes, and snippets.

@MaHu6
Last active March 30, 2018 07:49
Show Gist options
  • Select an option

  • Save MaHu6/0abc4e879decb88b6f0f008377130403 to your computer and use it in GitHub Desktop.

Select an option

Save MaHu6/0abc4e879decb88b6f0f008377130403 to your computer and use it in GitHub Desktop.
EB-API Introduction

BTC收款账号

1DpsyTC2LK7zSn7uqnzZyDbxZogpC6ZboW

ETH收款账号

0xbedd25e94e7c54cd0174587ea7c5aac0468b15ad

获取虚拟币行情

  • METHOD GET

    • symbol
  • URL

    • http://demo.simahu.com/trader_binance/get_orderbook_ticker?symbol=BTCUSDT
  • RETURN

       	"data": {
     	    "askPrice": "7565.64000000", 
     	    "askQty": "0.68100000", 
     	    "bidPrice": "7564.99000000", 
     	    "bidQty": "0.09932700", 
     	    "symbol": "BTCUSDT"
       		}, 
       	"status": 1
     	}
     	
     ststus = 1 : 执行正常,data内为执行结果
     ststus = 0 : 执行异常,data内为异常描述
    
    

提交支付

  • METHOD POST

    • sender
    • receiver
    • coin
    • value
    • order_num
  • URL

    • http://demo.simahu.com/trader_binance/order
  • RETURN

       	"data": {
     	    "create new pay order succeed"
       		}, 
       	"status": 1
     }
     ststus = 1 : 执行正常,data内为执行结果
     ststus = 0 : 执行异常,data内为异常描述
    
    

根据订单号查询状态

  • METHOD GET

    • order_num
  • URL

    • http://demo.simahu.com/trader_binance/query_order_by_num?order_num=1522307939897
  • RETURN

     	"data": {
     	    "coin": "BTC", 
     	    "insat": "Thu, 29 Mar 2018 15:16:56 GMT", 
     	    "order_num": "1522307939897", 
     	    "receiver": "0xbedd25e94e7c54cd0174587ea7c5aac0468b15ad", 
     	    "sender": "0xF65Cf1a9dDFB505E6fb477c85E2220C480Efb106", 
     	    "status": 0, 
     	    "value": 0.00324398
       		}, 
       "status": 1
     }
     ststus = 1 : 执行正常,data内为执行结果
     ststus = 0 : 执行异常,data内为异常描述
     data内的ststus = 0 : 该支付待确认
     data内的ststus = 1 : 该支付已确认
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment