Orders

Fetch Post Order Details

Use this endpoint to preview the outcome of a potential order. It provides critical information such as:

  • Estimated liquidation price (post-order)

  • AMM fees

  • Expected fill price

  • Margin impact, price impact and other execution metrics

POST https://perps-api-mainnet.polynomial.finance/post-trade-details?chainId=<chain_id>

Query

Name
Value

chain_id

8008 (mainnet) Addresses

Headers

Name
Value

Content-Type

application/json

Accept

application/json

x-api-key

Backend API key(optional)

Request body

Name
Type
Description

accountId

string

Perp Account Id. Returned by accounts api <ADD_LINK>

marketId

string

From markets api response.

sizeDelta

string

With 18 decimals precision. Ex -1000000000000000000 for shorting -1 size

Response

Retrieve All Orders

Use this endpoint to fetch the full list of orders associated with the account.

GET https://perps-api-mainnet.polynomial.finance/orders/v2?owner=<wallet_addr>&ownershipType=SuperOwner&statuses=<status>

Query

Name
Value

wallet_addr

8008 (mainnet) Addresses

statuses

Support : [Created,Committed,Expired,LimitSubmitted,LimitExecuted] Eg: statuses=Commited,Expired

Headers

Name
Value

Content-Type

application/json

Accept

application/json

x-api-key

Backend API key(optional)

Response

Last updated

Was this helpful?