# getInfo

> GET /trades/getInfo returns full trade information by uniq_id: status, payment wallet, partner commission and the needChangeAddress flag. Examples included.

Source: https://docs.yellowchanger.com/getInfo

Returns all information about transaction

**GET** `https://api.yellowchanger.com/trades/getInfo`

## Headers

| Name | Value |
| --- | --- |
| Content-Type | application/json |
| Y_API_KEY | Public API Key |
| [Signature](https://docs.yellowchanger.com/signature.md) | HMAC SHA256 of Body |

## Body

| Name | Type | Description |
| --- | --- | --- |
| uniq_id | string | Unique id of trade |

## Response

**200**

```json
{
          "send_name": "USDT",
          "send_network": "TRC20",
          "get_network": "ERC20",
          "get_name": "USDT",
          "uniq_id": "0sv0c0c02da105aa6b7fbzf1zv05444d8a0ccd4c",
          "status": 1,
          "payment_wallet": "WalletForPay",
          "userPaidHash": "someHash",
          "ourHash": "someHash",
          "get_creds": "WalletForRecive",
          "network_commission": 0,
          "date": 1720120863,
          "time_expire": 1720142463,
          "send_value": "112",
          "get_value": "100",
          "sbpBank": null,
          "exch_type": "yellow",
          "recalculation": 1,
          "percent_commission": 0.5,
          "paid_amount": 0,
          "paid_time": 1738777524,
          "send_memo": "SomeMemo",
          "commission_amount": 3,
          "commission_calculated": true,
          "network_fee": 0,
          "needChangeAddress": false
}
```

**40X**

```json
{
          "statusCode": 400,
          "message": "Some error message"
}
```

## Partner commission

The commission for a completed trade (status 3) is calculated in the background and appears within a few minutes after the exchange is finished. Until the calculation is done, commission_amount is 0 — rely on commission_calculated. Both fields are returned only for status 3.

| Name | Type | Description |
| --- | --- | --- |
| commission_calculated | boolean | Whether the commission calculation is finished. false — the commission is still being calculated and commission_amount is not meaningful yet; true — the calculation is done and the value is final. |
| commission_amount | number | Partner commission in USDT credited to the balance. Meaningful only when commission_calculated is true. |

## Payout address

If needChangeAddress is true, the payout address was rejected and the trade is waiting for a new one — send it with changeAddress.

## Example

**JavaScript**

```javascript
const options = {
          method: "GET",
          headers: {
                    "Content-Type": "application/json",
                    Y_API_KEY: "Your API Key",
                    Signature: "e4ae46c268b77ad7fb7d12da1eeb8ad3218779c52c926c63407971da7537848e",
          },
          body: '{"uniq_id":"0sv0c0c02da105aa6b7fbzf1zv05444d8a0ccd4c"}',
};
fetch("https://api.yellowchanger.com/trades/getInfo", options)
          .then((e) => e.json())
          .then((e) => console.log(e))
          .catch((e) => console.error(e));
```

**Python**

```python
import requests

url = "https://api.yellowchanger.com/trades/getInfo"

payload = {"uniq_id": "0sv0c0c02da105aa6b7fbzf1zv05444d8a0ccd4c"}
headers = {
    "Content-Type": "application/json",
    "Y_API_KEY": "Your API Key",
    "Signature": "e4ae46c268b77ad7fb7d12da1eeb8ad3218779c52c926c63407971da7537848e"
}

response = requests.request("GET", url, json=payload, headers=headers)

print(response.text)
```

## Related

- [Status info](https://docs.yellowchanger.com/statusInfo.md): Description of statuses in methods createTrade and getInfo
- [changeAddress](https://docs.yellowchanger.com/changeAddress.md): Change the payout address of an exchange. Available only when needChangeAddress in getInfo is true.
- [cancelTrade](https://docs.yellowchanger.com/cancelTrade.md): Cancel the exchange
- [createTrade](https://docs.yellowchanger.com/createTrade.md): Create new trade and returns trade info

---

All methods: https://docs.yellowchanger.com/introduction.md · Index: https://docs.yellowchanger.com/llms.txt · Whole documentation in one file: https://docs.yellowchanger.com/llms-full.txt
