GET /account/deposit-target
How to fund this account
How to fund this account.
operationId: fetchDepositTarget · CCXT method: fetchDepositAddress
Authentication: hmacAuth.
Machine-readable funding instructions for the authenticated account, so an autonomous client can fund itself without out-of-band knowledge of how a given deployment accepts collateral.
The response is a discriminated union on mode, and which mode you get is a property of the deployment, not of the request. Branch on mode; do not assume either shape. A deployment with a real deposit-contract address configured answers onchain; otherwise it answers testnet-faucet and points at its synthetic-credit endpoints. There is no request parameter that selects between them.
An address is never fabricated to fill the onchain shape. A deployment configured for on-chain deposits whose address is malformed refuses with 503 rather than silently falling back to the faucet, because depositing to a bad address burns the funds.
confirm is identical in both modes and is the portable primitive: poll GET /account until balance reflects the funds.
This operation is discovery only. It moves no funds, creates no deposit, and has no side effect — acting on the returned faucet or onchain instruction is a separate, explicit step by the caller.
Responses
200
Funding instructions for the authenticated account. Exactly one mode is returned; the fields beyond the common ones depend on it.
401
— (no schema declared)
—
403
— (no schema declared)
Refused with EARLY_ACCESS_REQUIRED: this deployment restricts funding to early-access participants and the authenticated account is not one. Permanent for that account until it is enrolled — do not retry. The gate deliberately mirrors POST /account/credit and POST /faucet, so an account that cannot be funded is not told how to fund. Deployments with early access disabled never return it. The contract-wide RESTRICTED_JURISDICTION refusal can also surface as a 403 on any operation — see “Jurisdiction restrictions”.
429
— (no schema declared)
—
503
— (no schema declared)
DEPOSIT_TARGET_MISCONFIGURED: the deployment is configured for on-chain deposits but its deposit-contract address is not a well-formed address, so no funding target can be published. This is an operator misconfiguration rather than a transient fault; retrying does not clear it, and the endpoint deliberately refuses rather than answering testnet-faucet, which would mask the bad configuration.
Example
curl -X GET 'https://exchange.nexus.xyz/api/exchange/account/deposit-target' \
-H 'X-API-Key: nx_7f3a1b...' \
-H 'X-Timestamp: 1776033911836' \
-H 'X-Signature: <hmac-sha256>'import requests
headers = {
"X-API-Key": "nx_7f3a1b...",
"X-Timestamp": "1776033911836",
"X-Signature": "<hmac-sha256>"
}
response = requests.get("https://exchange.nexus.xyz/api/exchange/account/deposit-target", headers=headers)
response.raise_for_status()
print(response.json())const response = await fetch("https://exchange.nexus.xyz/api/exchange/account/deposit-target", {
method: "GET",
headers: {
"X-API-Key": "nx_7f3a1b...",
"X-Timestamp": "1776033911836",
"X-Signature": "<hmac-sha256>"
},
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());X-Signature is a placeholder: it is derived from this specific request. See Authentication for the canonical string and the HMAC rule.
Generated from eng/apps/exchange/api/openapi.json (spec 0.9.36). Do not edit by hand — regenerate with python3 product/docs/tools/api-reference/generate.py. Hand-authored context lives in the Guides pages.
Last updated

