Skip to content

wrong with sell market. #185

@xiHashking

Description

@xiHashking

this logs show ,i must use price,why,but i check another market sell with no price in market ,it's right.


first one

INFO: 192.168.65.1:56224 - "POST /api/positions/with_token_ids HTTP/1.1" 200 OK
[2025-11-26 06:42:18] [app.routes.order] [INFO] 市价卖单: amount=2.85, price=$0, token_id=7369182025...
[2025-11-26 06:42:21] [app.routes.order] [ERROR] Sell order failed: Traceback (most recent call last):
File "/app/app/routes/order.py", line 167, in sell_market_order
signed_order = await sync_to_async(client.create_market_order)(order_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/asgiref/sync.py", line 502, in call
ret = await asyncio.shield(exec_coro)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/asgiref/sync.py", line 556, in thread_handler
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.11/site-packages/py_clob_client/client.py", line 457, in create_market_order
raise Exception(
Exception: price (0.999), min: 0.01 - max: 0.99

INFO: 192.168.65.1:57737 - "POST /api/sell HTTP/1.1" 200 OK


other one

INFO: 192.168.65.1:27215 - "POST /api/positions/with_token_ids HTTP/1.1" 200 OK
INFO: 127.0.0.1:59086 - "GET /health HTTP/1.1" 200 OK
INFO: 192.168.65.1:52941 - "POST /api/positions/with_token_ids HTTP/1.1" 200 OK
[2025-11-26 06:54:20] [app.routes.order] [INFO] 市价卖单: amount=1.69, price=$0, token_id=4139261429...
INFO: 127.0.0.1:50910 - "GET /health HTTP/1.1" 200 OK
[2025-11-26 06:54:29] [app.routes.order] [INFO] Sell order response: {
"errorMsg": "",
"orderID": "0x88f861d062f37a1ca1da768d7293b9f92030027b8e91a9a4c892612c0d292321",
"takingAmount": "0.9802",
"makingAmount": "1.69",
"status": "matched",
"transactionsHashes": [
"0x6cde9fc0e80fded90fddc06d7e896f8b120f74c9f9f42333138bf453ae64ea22"
],
"success": true
}
[2025-11-26 06:54:29] [app.routes.order] [INFO] 卖出成功: shares=1.69, avg_price=58.0¢, revenue=$0.98
INFO: 192.168.65.1:22256 - "POST /api/sell HTTP/1.1" 200 OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions