Explorer

Get Orders History

Get the orders history of a user.

The getOrdersHistory function retrieves the list of orders for the authenticated user.

Available on

Ethereum
Ethereum
Polygon
Polygon
Avalanche
Avalanche
Arbitrum
Arbitrum
BSC
BSC
Fantom
Fantom
Linea
Linea
Metis
Metis
Optimism
Optimism
Base
Base
Base Sepolia
Base Sepolia
HyperEVM Testnet
HyperEVM Testnet
Polygon Amoy
Polygon Amoy

To enable these chains for your application, please configure them in the Okto Dashboard.

Not available on

Method Overview

MethodsDescription
async getOrdersHistoryGet the orders history of a user

Get Orders History

async getOrdersHistory(OktoClient) retrieves the user's order history.

Parameters

ParameterTypeDescription
oktoClientOktoClientOkto client

Response

Success Response

Field NameTypeDescription
resultPromise<Order[]>Returns the list of orders for a user

Example

Important: Transaction Lifecycle

The getOrderHistory function fetches the current status of a transaction on the Okto chain. However, the transaction status will continue to update on the Okto chain as it progresses through various stages in the Distributed Transaction Network (DTN).

To track a transaction to completion:

  • Keep fetching the order history for your specific jobId until the status shows "SUCCESSFUL"
  • Once successful, the transaction hash will be available in the response
  • Use this transaction hash to verify the transaction on the destination chain's explorer

Note

In case of errors, debug the error using the error code and refer to the SDK errors and warnings documentation for more details.

On this page