> For the complete documentation index, see [llms.txt](https://docs.neox.vn/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neox.vn/docs/global/global-collections/integration/fx/get-detail-fx-order.md).

# Get Detail FX Order

#### Endpoint: GET /v2/gc/fx/orders/{requestId}

#### Description: Retrieve the current status and full details of an FX order by the merchant-assigned request ID used when creating the order.

## Request

#### Request Params Field Descriptions

| Field Name      | Type   | Required | Description                                                                                     |
| --------------- | ------ | -------- | ----------------------------------------------------------------------------------------------- |
| childMerchantId | string | No       | Child (sub-merchant) identifier. Provide when querying an FX order on behalf of a sub-merchant. |

### Response

#### Response Field Descriptions

| Field Name    | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| code          | number | Response code.                   |
| state         | number | State of the response.           |
| data          | object | FX order detail.                 |
| message       | string | Response message.                |
| neoResponseId | string | Unique NeoX response identifier. |

#### `data` object fields:

| Field Name     | Type        | Description                                                                         |
| -------------- | ----------- | ----------------------------------------------------------------------------------- |
| fxOrderId      | string      | NeoX identifier for this FX order.                                                  |
| requestId      | string      | Merchant-assigned request ID echoed from the original Create FX Order call.         |
| serialNum      | string      | Platform serial number assigned to this FX trade.                                   |
| status         | string      | Current FX order status. Enum: `SUCCESS` \| `FAIL` \| `DELIVERING` \| `PROCESSING`. |
| fxRate         | number      | FX rate applied to this conversion trade.                                           |
| sourceCurrency | string      | ISO 4217 currency code of the source (selling) currency.                            |
| sourceAmount   | number      | Amount converted from `sourceCurrency`.                                             |
| targetCurrency | string      | ISO 4217 currency code of the target (buying) currency.                             |
| targetAmount   | number      | Amount received in `targetCurrency` after conversion.                               |
| createdAt      | date string | Timestamp when the FX order was created (ISO 8601).                                 |
| updatedAt      | date string | Timestamp of the most recent status update (ISO 8601).                              |

#### Response sample

```json
{
  "code": 1,
  "state": 2,
  "data": {
    "fxOrderId": "FX-20240815-00223344",
    "requestId": "d4e5f6a7-4444-5555-6666-ddeeff001122",
    "serialNum": "SN2024081500223344",
    "status": "DELIVERING",
    "fxRate": 7.2815,
    "sourceCurrency": "USD",
    "sourceAmount": 10000.00,
    "targetCurrency": "CNH",
    "targetAmount": 72815.00,
    "createdAt": "2024-08-15T09:00:00Z",
    "updatedAt": "2024-08-15T09:20:00Z"
  },
  "message": "Successful",
  "neoResponseId": "de7750c5-772e-4136-ac78-62c57a106cce"
}
```

## Example cURL

```bash
curl -X GET "https://{base_url_openapi}/v2/gc/fx/orders/{requestId}" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Accept-Language: en"
```

### Notes

* Requires Bearer token in the Authorization header.
* The Accept-Language header can be used to specify the response language (Support: "vi", "en").
* Replace `{requestId}` with the merchant-assigned `requestId` used when creating the FX order.
* Use this endpoint to poll trade status when a webhook notification has not yet been received.
* When `status=DELIVERING`, the trade has executed successfully and settlement is in progress; use the Get FX Delivery Status API (`GET /v2/gc/fx/orders/{requestId}/delivery`) to track the settlement outcome.


---

# 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://docs.neox.vn/docs/global/global-collections/integration/fx/get-detail-fx-order.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.
