> For the complete documentation index, see [llms.txt](https://vnx.gitbook.io/vnx-global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vnx.gitbook.io/vnx-global/developer/quickstart/first-api-call.md).

# First API Call

*Verify connectivity with a public **`GET /client/assets`**, then make your first signed **`POST /private/accountBalance`** against the VNX test environment.*

## Before you begin

* An ECDSA key pair generated at [my.uat.vnx.io](https://my.uat.vnx.io/) (see Prerequisites).
* Test base URL: `https://api.uat.vnx.io/api/v1/`.
* A REST client (cURL, Postman, or your language SDK).

## Verify connectivity with a public call

`GET /client/assets` needs no signing — only the required `x-app-public-key` header.

```bash
curl -H "x-app-public-key: <public_key>" \     https://api.uat.vnx.io/api/v1/client/assets
```

```json
{  "assets": [    { "symbol": "VCHF", "name": "VNX Swiss Franc" },    { "symbol": "VGBP", "name": "VNX British Pound" }  ]}
```

## Make your first signed call: `POST /private/accountBalance`

Build the signing string from the URI path, the request body (empty here), and the nonce; sign it with ECDSA-SHA256 and base64url-encode it. Send the three auth headers plus `User-Agent`. See Authentication for the full signing recipe.

```http
POST /api/v1/private/accountBalance HTTP/1.1 Host: api.uat.vnx.io Content-Type: application/x-www-form-urlencoded User-Agent: MyClient/1.0 x-app-public-key: <public_key> x-app-nonce: 1708881600000 x-app-signed-data: <base64url_signature>(empty body)
```

```json
{  "balances": [    { "asset": "VCHF", "available": "0.00", "pending": "0.00" },    { "asset": "GBP",  "available": "0.00", "pending": "0.00" }  ]}
```

## Verify

* The public call returns HTTP 200 with the asset list — connectivity is good.
* The signed call returns HTTP 200 with your balances (empty for a new test account) — your key pair, signing string, and nonce are all correct.

Remember the nonce must be **strictly higher** on each subsequent request, and you may send at most **1 request/sec** per public key.

## Common errors

| Code                  | Meaning                                       | Fix                                                                             |
| --------------------- | --------------------------------------------- | ------------------------------------------------------------------------------- |
| 400 bad request       | Missing or malformed payload                  | Validate the body and content type                                              |
| 401 signature failure | Wrong key, bad signing string, or stale nonce | Re-check signing string, public key, and that the nonce is higher than the last |
| 429 rate limited      | Exceeded 1 request/sec per public key         | Back off; see retries                                                           |

## Next steps

* [Sandbox vs Production](/vnx-global/developer/quickstart/sandbox-vs-production.md)
* [Authentication](/vnx-global/developer/concepts/authentication.md)
* [Nonce and Retries](/vnx-global/developer/nonce-and-retries.md)

## Related

* [API Overview](/vnx-global/developer/api/overview.md)
* [Nonce and Retries](/vnx-global/developer/nonce-and-retries.md)
* [Glossary](/vnx-global/glossary.md)
