Skip to main content
POST
/
api
/
v1
/
trading
/
orders
/
{order_id}
/
sync
Sync Order
curl --request POST \
  --url https://api.example.com/api/v1/trading/orders/{order_id}/sync
{
  "message": "<string>",
  "previous_status": "<string>",
  "current_status": "<string>",
  "changed": true
}

Usage

result = client.sync_order(order_id="ord_abc123")

Parameters

order_id
string
required
The order ID to sync.

Response

message
string
Sync result message.
previous_status
string
Order status before sync.
current_status
string
Order status after sync.
changed
boolean
Whether the status changed.

Example

from polyhush import PolyhushClient

client = PolyhushClient(api_key="your-api-key")

result = client.sync_order(order_id="ord_abc123")

if result['changed']:
    print(f"Status updated: {result['previous_status']}{result['current_status']}")
else:
    print(f"Status unchanged: {result['current_status']}")

Response

{
  "message": "Order synced successfully",
  "previous_status": "PLACED",
  "current_status": "FILLED",
  "changed": true
}

When to Use

Use sync_order() when:
  • An order status seems stale or incorrect
  • You suspect an order filled but the status hasn’t updated
  • WebSocket updates may have been missed
  • Debugging order state discrepancies
Order status is normally updated automatically via WebSocket. Manual syncing is only needed in exceptional cases.