# Orders

### Orders[​](https://docs.x.immutable.com/docs/x/how-to-get-data#orders) <a href="#orders" id="orders"></a>

#### Get list of orders[​](https://docs.x.immutable.com/docs/x/how-to-get-data#get-list-of-orders) <a href="#get-list-of-orders" id="get-list-of-orders"></a>

* Typescript Core SDK

V3 ORDERS ENDPOINTS MIGRATION

Please refer to this <mark style="color:blue;">guide</mark> when you plan your migration to the upgraded v3 endpoints, and to learn more about maker taker fees please see <mark style="color:blue;">here</mark>.

📚SDK REFERENCE

* <mark style="color:blue;">listOrders</mark>

#### Request[​](https://docs.x.immutable.com/docs/x/how-to-get-data#request-8) <a href="#request-8" id="request-8"></a>

Get a list of active orders from a particular collection that are listed in `ETH` and sorted by `name`:

```
const getListOrders = async (
  status: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive',
  orderBy:
    | 'created_at'
    | 'expired_at'
    | 'sell_quantity'
    | 'buy_quantity'
    | 'buy_quantity_with_fees'
    | 'updated_at',
  sellTokenAddress: string,
  buyTokenType: string
) => {
  const response = await client.listOrders({
    status,
    orderBy,
    sellTokenAddress,
    buyTokenType,
  });
  return response;
};
getListOrders(
  'active',
  'buy_quantity_with_fees',
  '0x61e506cec264d5b2705f10e5a934dc5313a56a6e',
  'ETH'
)
  .then((result) => {
    console.log(result);
  })
  .catch((e) => {
    console.log(e);
  });
```

#### Example response[​](https://docs.x.immutable.com/docs/x/how-to-get-data#example-response-6) <a href="#example-response-6" id="example-response-6"></a>

```
{
  result: [
    {
      order_id: 1506, // ID of the order
      status: 'active', // Status of the order
      user: '0x192f36ee2bd12cf90571e464a3d28e76b8462c87', // Ethereum address of the user who submitted the order
      sell: { // Details about the asset in sale
        type: 'ERC721', // Type of this asset (ETH/ERC20/ERC721), it used to buy the asset
        data: {
          token_id: '271', // ERC721 Token ID
          token_address: '0x61e506cec264d5b2705f10e5a934dc5313a56a6e', // Address of ERC721/ERC20 contract
          quantity: '1',  // Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API
          quantity_with_fees: '',  // Quantity of this asset with the sum of all fees applied to the asset
          properties: { // Properties of the asset in sale
            name: 'CityEscape #1',
            image_url: 'https://ipfs.thearknft.io/ipfs/bafkreibq3wnukid4fdfdugjjefjsom553mjloealius5cidqvtktvxf4va',
            collection: [Object]
          }
        }
      },
      buy: {  // Details about the asset used to buy
        type: 'ETH',  // Type of this asset (ETH/ERC20/ERC721), it used to buy the asset
        data: {
          token_address: '', // Address of ERC721/ERC20 contract. If the type is ETH, no address is required
          decimals: 18, // Number of decimals supported by this asset
          quantity: '530000000000000000', // Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API
          quantity_with_fees: '530000000000000000' // Quantity of this asset with the sum of all fees applied to the asset
        }
      },
      amount_sold: null, // Amount of the asset already sold by this order
      expiration_timestamp: '2121-09-28T13:00:00Z', // Expiration timestamp of this order
      timestamp: '2022-09-28T13:26:26.327782Z', // Timestamp this order was created
      updated_timestamp: '2022-09-28T13:26:26.327782Z' // Updated timestamp of this order
    },
    // Other orders returned
    ...
  ],
 cursor: 'eyJvcmRlcl9pZCI6MTU0Niwic2VsbF9xdWFudGl0eSI6IjEiLCJidXlfcXVhbnRpdHkiOiI4MDAwMDAwMDAwMDAwMDAwMCIsImJ1eV9xdWFudGl0eV9pbmNsdXNpdmVfZmVlcyI6IjgzMjAwMDAwMDAwMDAwMDAwIiwiZXhwaXJlZF9hdCI6IjIxMjEtMDktMjlUMDA6MDA6MDBaIiwiY3JlYXRlZF9hdCI6IjIwMjItMDktMjlUMDA6NDc6MTMuODA2NjU2WiIsInVwZGF0ZWRfYXQiOiIyMDIyLTA5LTI5VDAwOjQ3OjEzLjgwNjY1NloiLCJ0c19zb3J0X3JhbmsiOm51bGx9',
  // Remaining results
  remaining: 0
}
```

* Kotlin (JVM) Core SDK

SDK REFERENCE

* <mark style="color:blue;">listOrders</mark>

* Swift Core SDK

SDK REFERENCE

* <mark style="color:blue;">listOrders</mark>

* Golang Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">ListOrders</mark>

* C# Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">ListOrders</mark>

#### Get details about an order[​](https://docs.x.immutable.com/docs/x/how-to-get-data#get-details-about-an-order) <a href="#get-details-about-an-order" id="get-details-about-an-order"></a>

* Typescript Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">getOrder</mark>

#### Request[​](https://docs.x.immutable.com/docs/x/how-to-get-data#request-9) <a href="#request-9" id="request-9"></a>

Get details about an order with ID `1506`, including fees:

```
const getOrder = async (id: string, includeFees: boolean) => {
  const response = await client.getOrder({
    id,
    includeFees,
  });
  return response;
};
getOrder('1506', true)
  .then((result) => {
    console.log(result);
  })
  .catch((e) => {
    console.log(e);
  });
```

#### Example response[​](https://docs.x.immutable.com/docs/x/how-to-get-data#example-response-7) <a href="#example-response-7" id="example-response-7"></a>

```
{
      order_id: 1506, // ID of the order
      status: 'active', // Status of the order
      user: '0x192f36ee2bd12cf90571e464a3d28e76b8462c87', // Ethereum address of the user who submitted the order
      sell: { // Details about the asset in sale
        type: 'ERC721', // Type of this asset (ETH/ERC20/ERC721), it used to buy the asset
        data: {
          token_id: '271', // ERC721 Token ID
          token_address: '0x61e506cec264d5b2705f10e5a934dc5313a56a6e', // Address of ERC721/ERC20 contract
          quantity: '1',  // Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API
          quantity_with_fees: '',  // Quantity of this asset with the sum of all fees applied to the asset
          properties: { // Properties of the asset in sale
            name: 'CityEscape #1',
            image_url: 'https://ipfs.thearknft.io/ipfs/bafkreibq3wnukid4fdfdugjjefjsom553mjloealius5cidqvtktvxf4va',
            collection: [Object]
          }
        }
      },
      buy: {  // Details about the asset used to buy
        type: 'ETH',  // Type of this asset (ETH/ERC20/ERC721), it used to buy the asset
        data: {
          token_address: '', // Address of ERC721/ERC20 contract. If the type is ETH, no address is required
          decimals: 18, // Number of decimals supported by this asset
          quantity: '530000000000000000', // Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API
          quantity_with_fees: '530000000000000000' // Quantity of this asset with the sum of all fees applied to the asset
        }
      },
      amount_sold: null, // Amount of the asset already sold by this order
      expiration_timestamp: '2121-09-28T13:00:00Z', // Expiration timestamp of this order
      timestamp: '2022-09-28T13:26:26.327782Z', // Timestamp this order was created
      updated_timestamp: '2022-09-28T13:26:26.327782Z' // Updated timestamp of this order
      fees: [  // Fees info
        {
          type: 'protocol',
          address: '0xa6c368164eb270c31592c1830ed25c2bf5d34bae',
          token: [Object],
          amount: '10000000000000000'
        },
        {
          type: 'royalty',
          address: '0x192f36ee2bd12cf90571e464a3d28e76b8462c87',
          token: [Object],
          amount: '10000000000000000'
        },
        {
          type: 'royalty',
          address: '0x59bb6d1b896a9a139380bf2b8d828819f0cf1409',
          token: [Object],
          amount: '10000000000000000'
        }
      ]
}
```

* Kotlin (JVM) Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">getOrder</mark>

* Swift Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">getOrder</mark>

* Golang Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">GetOrder</mark>

* C# Core SDK

📚SDK REFERENCE

* <mark style="color:blue;">GetOrder</mark>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xpansionchain-1.gitbook.io/xpansionchain/guides/basic-guides/get-data/orders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
