Market Cap: $2.8003T 2.04%
Volume(24h): $76.1875B 3.63%
Fear & Greed Index:

72 - Greed

  • Market Cap: $2.8003T 2.04%
  • Volume(24h): $76.1875B 3.63%
  • Fear & Greed Index:
  • Market Cap: $2.8003T 2.04%
Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos
Top Cryptospedia

Select Language

Select Language

Select Currency

Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos

How to View Your SOL Order History on OKX?

Sure! Please provide the article you'd like me to base the sentence on.

Sep 21, 2026 at 01:20 pm

Accessing SOL Order History via OKX REST API

1. Use the order_history endpoint with instId set to 'SOL-USDT' or other SOL trading pairs.

2. Specify instType as 'SPOT' for spot orders or 'MARGIN' for margin orders involving SOL.

3. Set limit parameter between 1 and 100 to control response size per request.

4. Include valid API credentials: OK-ACCESS-KEY, OK-ACCESS-SIGN, OK-ACCESS-TIMESTAMP, and OK-ACCESS-PASSPHRASE in HTTP headers.

5. Construct signature using HMAC-SHA256 over concatenated string: 'GET' + '/api/v5/trade/order-history' + timestamp + request body (empty for GET).

Handling Pagination for Complete SOL Order Records

1. Initial request returns up to 100 orders with an 'after' field containing the latest order ID.

2. Subsequent requests must include the 'after' value from previous response to fetch older orders.

3. Repeat until response data array is empty or contains fewer than requested limit entries.

4. Avoid hardcoding pagination logic—treat 'after' as opaque cursor without parsing its internal structure.

5. Store each batch separately before merging to prevent memory overflow during large history retrieval.

Correct Parameter Formatting for SOL Orders

1. Ensure instId matches exact naming convention used by OKX: 'SOL-USDT', 'SOL-BTC', or 'SOL-USDC'.

2. Use Decimal instead of float for price and size fields when placing or querying orders to avoid precision loss.

3. Pass timestamps in milliseconds since Unix epoch for before/after filters if narrowing time range.

4. Do not omit tdMode parameter when filtering margin-related SOL orders—it must be 'cross' or 'isolated'.

5. Confirm that API key has at least 'Read' permission enabled under security settings in OKX account dashboard.

Common Errors When Fetching SOL Order Data

1. HTTP 401 error indicates invalid signature, expired timestamp, or mismatched passphrase.

2. HTTP 400 with code '51000' means instId does not exist or is misspelled—verify case sensitivity and hyphen usage.

3. Empty response with code '0' but no data suggests incorrect instType or missing tdMode for margin orders.

4. Rate limiting triggers HTTP 429—respect X-Rate-Limit-Remaining header and implement exponential backoff.

5. OkxParamsException arises from malformed Decimal inputs or unsupported bar intervals in related market calls.

Frequently Asked Questions

Q: Can I retrieve SOL order history older than 90 days?A: Yes. The order_history endpoint supports retrieval beyond 90 days depending on account activity and OKX’s retention policy. No explicit cutoff is documented in current V5 specifications.

Q: Does order_history include filled, canceled, and rejected SOL orders?A: Yes. All order states except partially filled ones are included. Partially filled orders appear only while active; historical partial fills are not retained post-cancellation or completion.

Q: Is there a WebSocket alternative for real-time SOL order updates?A: Yes. Subscribe to the /private/orders channel using WebSocket with proper authentication. This delivers live order status changes without polling.

Q: Why do some SOL orders show different fee currencies across responses?A: Fee currency depends on the trading mode: spot orders use base or quote asset as fee, while margin orders may deduct fees from the borrowed asset or account balance based on configuration.

Disclaimer:info@kdj.com

The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!

If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.

Related knowledge

See all articles

User not found or password invalid

Your input is correct