hourglass-startDCA

Explore authentication, endpoints, and trading operations to start trading efficiently. Whether you're a developer or a trader, this guide has everything you need to get started with Panora's APIs.

1. Create a DCA Order

POST https://api.panora.exchange/dca/v1/createOrder

Headers

  • Public API Key:

    a4^KV_EaTf4MW#ZdvgGKX#HUD^3IFEAOV_kzpIE^3BQGA8pDnrkT7JcIy#HNlLGi

    Note: This API key's limits should be sufficient for most use cases. Protocols within the Aptos ecosystem with specific requirements or customization may submit a ticket on Discord.

Name
Value
Description

x-api-key

Your API Key

Use the public API key or enter the API key provided by Panora

Request Body

Parameter
Required
Type
Description

chainId

yes

string

ID for the chain for which the endpoint is being invoked.

toWalletAddress

yes

0x${string}

Address of the wallet to receive the purchased tokens.

fromTokenAddress

yes

0x${string}

Address of the token you're selling.

toTokenAddress

yes

0x${string}

Address of the token you're buying.

fromTokenAmount.value

yes

string

Amount of tokens to sell (either total or per order).

fromTokenAmount.type

yes

"total" | "perorder"

Whether the amount is total for the entire DCA or per individual order.

interval.value

yes

string

Value of the time interval between each order.

interval.timePeriod

yes

"minute" | "hour" | "day" | "week" | "month"

Unit of time for the interval.

numberOfOrders

yes

number

Total number of orders to execute over time.

minRateToTokenPerFromToken

no

string

Minimum acceptable exchange rate (toToken per fromToken).

maxRateToTokenPerFromToken

no

string

Maximum acceptable exchange rate (toToken per fromToken).

delay.value

no

string

Value for delay before the first order starts.

delay.timePeriod

no

"minute" | "hour" | "day" | "week" | "month"

Unit of time for the delay.

slippagePercentage

no

string

Slippage tolerance percentage allowed for each order.

Request Example

2. Cancel a DCA Order

POST https://api.panora.exchange/dca/v1/cancelOrder

Request Body

Parameter
Required
Type
Description

chainId

no

string

ID for the chain for which the endpoint is being invoked.

toWalletAddress

no

string

Address of the wallet associated with the transaction to be cancelled.

panoraTxId

yes

string

The Panora transaction ID of the order that needs to be cancelled.

Request Example

3. Get DCA Orders

POST https://api.panora.exchange/dca/v1/getOrders

Parameter
Required
Type
Description

chainId

Yes

number

ID for the chain for which the endpoint is being invoked.

toWalletAddress

Yes

string

Wallet address associated with the order.

panoraTxId

No

string

Specific transaction ID to filter results.

status

Yes

"active" | "completed"

Filter orders by their status.

txDetails

No

boolean

Whether to include transaction details in the response.

limit

Yes

number

Maximum number of results per page.

pageNumber

Yes

number

Page number for pagination.

πŸ“¦ DCAOrdersResponse (Object)

Parameter
Type
Description

chainId

number

Chain ID of the DCA order.

toWalletAddress

string

Wallet address associated with the order.

pageNumber

number

Current page in the paginated response.

totalPages

number

Total number of pages available.

orders

array

List of DCA orders. Each item is an Order object.

πŸ“¦ orders[] (Order Object)

Parameter
Type
Description

panoraTxId

string

Unique ID of the Panora transaction.

fromToken

Token

Token being sold.

toToken

Token

Token being bought.

feeToken

Token

Token used to pay fees.

fromTokenAmountTotal

string

Total amount of fromToken for the DCA.

fromTokenAmountSpent

string

Amount of fromToken already used.

fromTokenAmountBalance

string

Remaining amount of fromToken.

fromTokenAmountWithdrawn

string

Withdrawn amount of fromToken.

toTokenAmountWithdrawn

string

Withdrawn amount of toToken.

numberOfOrdersTotal

number

Total number of orders.

fromTokenAmountPerOrder

string

Amount per order.

numberOfOrdersRemaining

number

Number of pending orders.

numberOfOrdersCompleted

number

Number of completed orders.

interval

object

Object with value and timePeriod ("minute", "hour", "day").

createdAtTime

string

ISO timestamp when order was created.

nextOrderTime

string

ISO timestamp of the next scheduled order.

estimatedCompletionTime

string (optional)

When the DCA is expected to complete.

avgPriceFromTokenPerToToken

string

Avg. price fromToken/toToken.

avgPriceToTokenPerFromToken

string

Avg. price toToken/fromToken.

minRateToTokenPerFromToken

string (optional)

Minimum rate (can be "Infinity").

maxRateToTokenPerFromToken

string (optional)

Maximum rate (can be "Infinity").

status

string

"active" | "filled" | "cancelled" | "refunded"

platformId

string

Platform identifier.

slippagePercentage

string

Allowed slippage.

delay

object (optional)

Delay config: value + timePeriod.

txDetails

array (optional)

List of transaction details (see below).

orders[] (Order Object)

Parameter
Type
Description

txId

string

Unique transaction ID.

txNumber

number

Sequential number of transaction.

type

string

One of "created", "filled", "attempted", "failed", "cancelled".

attemptNumber

number

Attempt count for this order.

fromTokenAmount

string

Amount used from source token.

fromTokenAmountUSD

string

USD value of fromTokenAmount.

toTokenAmount

string

Amount of output token received.

toTokenAmountUSD

string

USD value of toTokenAmount.

feeTokenAmount

string

Amount paid as fee.

feeTokenAmountUSD

string

USD value of fee paid.

time

string

Time when tx was processed.

priceFromTokenPerToToken

string (optional)

Execution price (from β†’ to).

priceToTokenPerFromToken

string (optional)

Execution price (to β†’ from).

Last updated