Open AflenChen opened 8 months ago
是不是私钥、钱包地址或API填错了?
2024-03-06 22:17:06.468 | INFO | aevo:sign_order:508 - {'name': 'Aevo Mainnet', 'version': '1', 'chainId': '1'}
Traceback (most recent call last):
File "/Users/jiamu/Documents/AEVO/aevoTrading/aevo_market_price_trade.py", line 89, in
这个错误怎么解决?大神
F:\aevo\aevoTrading(main -> origin) λ python aevo_trade.py 2024-02-20 08:19:56.506 | INFO | aevo:open_connection:93 - Opening Aevo websocket connection... 2024-02-20 08:19:57.331 | DEBUG | aevo:open_connection:102 - Connecting to wss://ws.aevo.xyz... 开始执行第1次交易 instrument_id: 1 limit_price: 2952.41 quantity: 0.2 2024-02-20 08:19:58.574 | INFO | aevo:sign_order:508 - {'name': 'Aevo Mainnet', 'version': '1', 'chainId': '1'} 2024-02-20 08:19:58.575 | INFO | aevo:sign_order:509 - limitPrice: 2952410000 2024-02-20 08:19:58.577 | INFO | aevo:sign_order:510 - amount: 200000 2024-02-20 08:19:58.578 | INFO | aevo:sign_order:511 - salt: 52238 2024-02-20 08:19:58.579 | INFO | aevo:sign_order:512 - isBuy: True 2024-02-20 08:19:58.580 | INFO | aevo:sign_order:513 - instrument_id: 1 2024-02-20 08:19:58.581 | INFO | aevo:sign_order:514 - timestamp: 1708388398 2024-02-20 08:19:58.581 | INFO | aevo:sign_order:517 - domain: <eip712_structs.make_domain..EIP712Domain object at 0x000001D114C1F040>
self.length start: 256
self.length end: 256
self.length start: 160
Traceback (most recent call last):
File "F:\aevo\aevoTrading\aevo_trade.py", line 59, in
asyncio.run(main())
File "C:\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
return future.result()
File "F:\aevo\aevoTrading\aevo_trade.py", line 46, in main
response = aevo.rest_create_order(instrument_id=instrument_id, is_buy=True, limit_price=limit_price, quantity=quantity, post_only=False)
File "F:\aevo\aevoTrading\aevo.py", line 188, in rest_create_order
data, order_id = self.create_order_rest_json(
File "F:\aevo\aevoTrading\aevo.py", line 376, in create_order_rest_json
salt, signature, order_id = self.sign_order(
File "F:\aevo\aevoTrading\aevo.py", line 519, in sign_order
signable_bytes = keccak(order_struct.signable_bytes(domain=domain))
File "F:\aevo\aevoTrading\eip712_structs.py", line 465, in signable_bytes
result = b"\x19\x01" + domain.hash_struct() + self.hash_struct()
File "F:\aevo\aevoTrading\eip712_structs.py", line 388, in hash_struct
return keccak(b"".join([self.type_hash(), self.encode_value()]))
File "F:\aevo\aevoTrading\eip712_structs.py", line 316, in encode_value
encoded_values.append(typ.encode_value(self.values[name]))
File "F:\aevo\aevoTrading\eip712_structs.py", line 40, in encode_value
return self._encode_value(value)
File "F:\aevo\aevoTrading\eip712_structs.py", line 101, in _encode_value
return Uint(160).encode_value(v)
File "F:\aevo\aevoTrading\eip712_structs.py", line 40, in encode_value
return self._encode_value(value)
File "F:\aevo\aevoTrading\eip712_structs.py", line 211, in _encode_value
padded_value = value.to_bytes(
OverflowError: int too big to convert