For the complete documentation index, see llms.txt. This page is also available as Markdown.

User Orders

Returns all pending limit orders for the provided wallet addresses.

Collection endpoint: Return pending orders for any requested address the DEX can read, even if the wallet has not used DexPal's affiliate code. If none of the provided addresses have pending orders, return 200 with "data": []. See the Overview.

Overview

Method

GET

Auth

Bearer API key

Rate limit

120 req/min

Request

Query Parameters

Param
Type
Required
Description

addr

string

yes

Comma-separated list of wallet addresses to query.

Headers

Header
Required
Description

Authorization

yes

Bearer <api_key>

Example Request

GET /dexpal/v1/users/orders?addr=0x1a2b...,0x9c3d...

Response

Returns a data array of pending limit order objects.

Fields — Order Object

Field
Type
Required
Description

orderId

string

yes

Unique order identifier in the format exchange:wallet:id e.g. "vela:0x1a2b...:85".

address

string

yes

The wallet address that placed this order.

exchange

string

yes

DEX slug e.g. "vela", "gmx".

side

enum

yes

Order direction. long or short.

baseAsset

string

yes

Base currency symbol e.g. "BTC".

quoteAsset

string

yes

Quote currency symbol e.g. "USD".

assetType

string

yes

Asset category. See AssetObject for valid values.

limitPrice

number

yes

Target execution price in quote currency. The order fills when the market reaches this price.

positionSizeUsd

number

yes

Position size that will open at execution, in USD.

positionSizeToken

number

yes

Position size in base currency at the limit price.

collateralUsd

number

yes

Collateral that will be posted at execution, in USD.

leverage

number

yes

Leverage that will be applied at execution.

feeFundingUsd

number

no

Estimated funding fee at time of order creation, in USD.

closingFeeUsd

number

no

Estimated closing fee if the position is closed immediately at execution, in USD.

chainId

integer

no

Wagmi/viem chain ID of the network where the order is placed.

createdAt

ISO8601

yes

Timestamp when the order was placed.

triggerOrders

no

Associated stop loss and take profit orders that will activate when this order fills. Empty array if none.

orderType

string

no

Order type classification. market, limit, stopMarket, stopLimit, trailingStop, twap, ladder, scale, oco, oto, takeProfit, iceberg.

orderFlags

array[string]

no

Execution modifier flags. Any subset of reduceOnly, postOnly, ioc, fok.

timeInForce

string

no

Time-in-force policy. gtc (good till cancelled), ioc (immediate or cancel), fok (fill or kill), gtt (good till time).

expiresAt

ISO8601

no

Expiry timestamp. Only set when timeInForce is gtt.

stopPrice

number

no

Trigger price for stop orders. Set on stopMarket and stopLimit orders.

trailAmount

number

no

Trail distance. Units depend on trailType.

trailType

string

no

Trail amount unit. percent or absolute.

activationPrice

number

no

Price at which trailing stop begins tracking.

triggerPriceType

string

no

Price feed used to evaluate the trigger. mark, last, or index.

twapConfig

no

TWAP execution parameters. Only present on twap orders.

linkedOrderId

string

no

Partner order ID for OCO (one-cancels-other) pairs.

isSystemGenerated

boolean

no

true if created automatically by the DEX (e.g. mandatory stop-loss).

accountId

string

no

Subaccount or portfolio ID.

Example Response

Error Responses

Status
Error
When

400

"Missing required parameter: addr"

addr absent

401

"Invalid or missing API key"

Bad or absent auth header

500

"Internal server error"

Unexpected failure

Notes

  • Only return orders with status pending (not yet filled, cancelled, or expired). Filled orders appear in history.

  • If none of the provided addresses have pending orders, return "data": [].

  • positionSizeToken should be calculated at the limitPrice, not the current market price.

  • Not all DEXes support trigger orders on limit orders. Return an empty triggerOrders array if not applicable.

Last updated