DepositAddressService
Create Deposit Address
Create or return the assigned deposit address for one account target and source chain. Requires the acting caller's root account to have accepted the current terms, including when using an API key.
Method
POST
Path
/v1/chain/deposit-addresses
Visibility
Authentication
Session token or API key
MFA Requirement
Not required
POST
/v1/chain/deposit-addresses Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/v1/chain/deposit-addresses' \
--header 'Accept: */*' \
--header 'X-API-KEY-ID: YOUR_API_KEY_ID' \
--header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \
--header 'X-API-SIGNATURE: YOUR_API_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"chainId": 1,
"subaccountId": "6789012345678"
}'Responses
{
"depositAddress": {
"chainId": 1,
"depositAddress": "0x7777777777777777777777777777777777777777"
}
} chainId integer
PolyChain-registered source chain id to assign the deposit address for.
subaccountId string (int64)
Optional subaccount public id. When omitted, the authenticated caller's root account is used as the target account.
2 fields
chainId integer (int32)
PolyChain-registered source chain id used across deposit flows.
Example
1 depositAddress string
Assigned external-chain deposit address for the selected account target.
Example
0x7777777777777777777777777777777777777777| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |