Skip to main content

Funding and transfers

Deposits move tokens from Solana into the exchange and therefore settle as Solana transactions. Everything else — withdrawals, transfers, vault operations — is a signed Nord action. Product-level behavior is described in Deposits and Withdrawals.

Deposit

const signature = await user.depositSpl(100, 0); // 100 USDC (tokenId 0)

// Or with the full result, including the buffer account used to correlate it:
const { signature: sig, buffer } = await user.deposit({
amount: 100,
tokenId: 0,
recipient, // optional; defaults to the user's own address
});

Deposits require a working Solana RPC connection (the solanaConnection passed to Nord.new) and an associated token account for the mint. A deposit is credited once it is processed by the exchange, so poll account state or watch the account stream rather than assuming the balance is available when the Solana signature confirms.

Deposit history is available at GET /account/{account_id}/history/deposit.

Withdraw

const { actionId } = await user.withdraw({
tokenId: 0,
amount: 100,
destPubkey, // optional; defaults to the user's wallet
});

Withdrawals are subject to a withdrawal fee and to the account's margin requirements. Quote the fee first:

const fee = await nord.getAccountWithdrawalFee(accountId);

History: GET /account/{account_id}/history/withdrawal.

Transfer between accounts

// Between accounts owned by the same wallet (subaccounts)
await user.transferOwned({ tokenId: 0, amount: 25, fromAccountId, toAccountId });

// To an account you do not own
await user.transferUnowned({ tokenId: 0, amount: 25, fromAccountId, toAccountId });

Omitting toAccountId on transferOwned moves funds to a new owned account, and the result's newAccountId reports it. History: GET /account/{account_id}/history/transfer.

Vaults

await user.vaultDeposit({ vaultId, amount: 100 });
await user.vaultWithdrawRequest({ vaultId, kind: "quoteNotional", amount: 50 });
await user.vaultWithdrawClaim({ vaultId });
await user.vaultSyncEpochs({ vaultId });

Vault withdrawals are two-step: a request, then a claim once the vault's epoch allows it. kind selects how the requested amount is interpreted (for example "quoteNotional"). Vault state is available at GET /vaults, GET /vault/{vault_id}, GET /vault/{vault_id}/user/{account_id}, and GET /account/{account_id}/vault-user-states.

All amounts on this page are decimals; the SDK scales them by the token's decimals from /info.

These materials are provided for informational purposes only and do not constitute financial, investment, legal, or tax advice, or an offer or solicitation to buy or sell any asset. Trading digital assets and derivatives involves substantial risk, including the possible loss of some or all capital. Products may not be available in all jurisdictions. Users are responsible for evaluating suitability and complying with applicable laws.