Closed redkiller79 closed 4 years ago
应该是价格问题,比如市价单没给价格,或者价格精度没给对,等等。请给出具体错误和测试的代码,以便帮助解决问题。
调试不通只有放弃了
火币提示杠杆倍数为空大佬能帮忙解决一下吗? 我直接修改了 hbdmswap下的hbdmswap.go的 leverRate 参数结果还是不行?是否可以把他直接加入到每个策略的配置文件里 手动去修改。
OKEX的错误提示: [root@cvm2631 gambler-short]# go run main.go 2020/10/04 09:30:33 wsURL: wss://real.okex.com:8443/ws/v3 2020/10/04 09:30:33 Dial: connection was successfully established with wss://real.okex.com:8443/ws/v3 2020/10/04 09:30:33 Send Msg: okex.BaseOp{Op:"login", Args:[]string{"54004279-1b73-421a-b1ef-7f6228dd8153", "Ioff45yhe45767", "1601775033.782", "OGzd/dvEOkjgtS8RoZVjIKUFoXAHGLt9CW+jnalZNZM="}} 2020/10/04 09:30:33 Dial: connect handler was successfully established with wss://real.okex.com:8443/ws/v3 2020/10/04 09:30:35 StopWin: 100 2020/10/04 09:30:35 StopLoss: 100 2020/10/04 09:30:35 FirstAmount: 1 2020/10/04 09:30:35 MaxGear: 5 2020/10/04 09:30:35 Currency: ETH-USDT-SWAP 2020/10/04 09:30:35 Symbol: ETH-USDT-SWAP 2020/10/04 09:30:35 {"event":"login","success":true} 2020/10/04 09:30:35 初始资产 Equity: 0 Available: 0 Http error(400~500) result: status=400, message=400 Bad Request, body={"error_message":"The Market Order does not support the specified price","result":"true","error_code":"35104","order_id":"-1"} 2020/10/04 09:30:35 Http error(400~500) result: status=400, message=400 Bad Request, body={"error_message":"The Market Order does not support the specified price","result":"true","error_code":"35104","order_id":"-1"} [{"error_message":"The Market Order does not support the specified price","result":"true","error_code":"35104","order_id":"-1"}] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x9ba47f]
goroutine 1 [running]: main.(GamblerStrategy).OnTick(0xc0000b4370, 0xc0000dfea0, 0x2) /root/crex-master/gambler-short/main.go:59 +0x24f main.(GamblerStrategy).Run(0xc0000b4370, 0x0, 0x0) /root/crex-master/gambler-short/main.go:86 +0x32 github.com/coinrust/crex/serve.Serve(0xc18940, 0xc0000b4370, 0x0, 0x0) /root/crex-master/serve/serve.go:57 +0x176 main.main() /root/crex-master/gambler-short/main.go:121 +0x41 exit status 2
The Market Order does not support the specified price。很明显是你市价单指定了价格吧。一般市价单不需要指定价格
火币的提示错误: [root@cvm2631 gambler-short]# go run main.go 2020/10/04 09:32:11 Dial: connection was successfully established with wss://api.hbdm.com/swap-ws 2020/10/04 09:32:11 subscribeHandler 2020/10/04 09:32:11 Dial: connect handler was successfully established with wss://api.hbdm.com/swap-ws 2020/10/04 09:32:13 Dial: connection was successfully established with wss://api.hbdm.com/swap-notification 2020/10/04 09:32:13 Login 2020/10/04 09:32:13 opReq: map[string]string{"AccessKeyId":"bc93b000-b5d958db-b1rkuf4drg-17faf", "Signature":"2LlyCCK+IA/yjilSADqnNBYHaWMuR88hyfSjm259//c=", "SignatureMethod":"HmacSHA256", "SignatureVersion":"2", "Timestamp":"2020-10-04T01:32:13", "op":"auth", "type":"api"} 2020/10/04 09:32:13 Dial: connect handler was successfully established with wss://api.hbdm.com/swap-notification 2020/10/04 09:32:14 StopWin: 100 2020/10/04 09:32:14 StopLoss: 100 2020/10/04 09:32:14 FirstAmount: 1 2020/10/04 09:32:14 MaxGear: 5 2020/10/04 09:32:14 Currency: ETH-USD 2020/10/04 09:32:14 Symbol: ETH-USD 2020/10/04 09:32:15 初始资产 Equity: 0 Available: 0 2020/10/04 09:32:15 error code=1094 msg=The leverage cannot be empty, please switch the leverage or contact customer service panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x9ba47f]
goroutine 1 [running]: main.(GamblerStrategy).OnTick(0xc0000b8370, 0xc0000e3ea0, 0x2) /root/crex-master/gambler-short/main.go:59 +0x24f main.(GamblerStrategy).Run(0xc0000b8370, 0x0, 0x0) /root/crex-master/gambler-short/main.go:86 +0x32 github.com/coinrust/crex/serve.Serve(0xc18940, 0xc0000b8370, 0x0, 0x0) /root/crex-master/serve/serve.go:57 +0x176 main.main() /root/crex-master/gambler-short/main.go:121 +0x41 exit status 2
你看下你的参数,价格应该给的不对,参考火币的api文档。
我没有修改策略的任何代码?也不会改只能是调试一下
大佬是否可以微信或者QQ交流一下
QQ: 2201441955
谢谢
但是OKEX 无法自动下单,提示下单价格有问题。 火币提示直接提示杠杆倍数为空,修改了几处代码都没有解决。请大神解决一下