viabtc / viabtc_exchange_server

A trading engine with high-speed performance and real-time notification
MIT License
2.68k stars 1.48k forks source link

how use order.put_limit #195

Open guareacher opened 5 years ago

guareacher commented 5 years ago

i use curl call ves

command: curl http://127.0.0.1:8080/ -d '{"method": "order.put_limit", "params": [1,"DSHBCH",2,"100","1.5","0.0001","0.0001",""], "id": 1}'

Response : { "error": { "code": 10, "message": "balance not enough" }, "result": null, "id": 1 }

objectt commented 5 years ago

user 1 has insufficient balance. run market.update(1, DSH, 2000)

zsyh commented 5 years ago

add some balance into user 1

{"method": "balance.update", "params": [1, "BCH", "test", 0, "150", {}], "id": 1} user_id, currency, business, business_id, change_amount, detail

business_id should increase during every request, else will return "repeat update"

more information see api doc https://github.com/viabtc/viabtc_exchange_server/wiki/HTTP-Protocol