0
Follow
0
Followers
Tài liệu API Ví dụ Kiểm tra không thành công
Created 2018-01-30 22:07:49 Updated 2018-01-30 22:08:02
2
2012
Ví dụ đơn giản nhất, nếu tôi muốn đặt một lệnh mua với giá 100 và số lượng 1 trên sàn giao dịch cứ mỗi 1 giây, tôi có thể viết như sau:
2.1 Khung chiến lược cổ điển
function onTick(){
exchange.Buy(100,1);
}
function main(){
while(true){
onTick();
Sleep ((1000);// Thời gian tạm ngưng có thể tùy chỉnh, đơn vị là mili giây ((1 giây = 1000 mili giây)
}
}
Hệ thống báo lỗi
ReferenceError: identifier 'onTick' undefined at main (FILE:22)
Chức năng nào nên được sử dụng nếu bạn muốn thực hiện các yêu cầu API liên tục
Related Recommendations
in main TypeError: IO() takes at most 3 arguments (5 given)symbol not setGetTicker: 400: {"code": 2, "data": {}, "message": "invalid params"}gateio getdepth 502Decrypt: Secret key decrypt failedGetOrders: 400: {"code":-1121,"msg":"Invalid symbol."}HTTP 403 errorBitcoin trading by using botsPlease translate the buy plan pageRunning botvs docker on android
Comment
All comments (2)
我直接复制 您上面的代码测试了下 , 运行是没问题。这个报错 ReferenceError: identifier 'onTick' undefined at main (FILE:22) 是说 22行 onTick 没有定义,方便的话您发下 22行代码 看下。查询订单 使用GetOrder 函数 , 详情参看 API 文档: https://www.botvs.com/api#GetOrder
9 years ago
- 1
