Skip to main content

Fund an account

Each active account has its own Solana wallet, its depositAddress. You receive it in the account.active webhook and on GET /v1/partner/accounts/{accountId}. To fund the account, send USDC on Solana to that address, from wherever your platform holds the user’s funds.
Send only USDC on Solana to a deposit address. The API does not bridge funds in from other networks, and does not credit any other token.
  • Moving the user’s funds into their account is your responsibility, from whichever network you hold them on.
  • The API sends no webhook when a deposit arrives. Read the balance to see it.
  • On staging the deposit address is on Solana devnet and takes only the staging test USDC, which ZeroID sends to your test accounts on request. See Sandbox.

Read the balance

GET /v1/balance with the portfolio:read scope and the Kash-Account header:
Every amount is a string of USDC atomic units, with 6 decimals: "25000000" is 25 USDC. Parse amounts as integers (BigInt in JavaScript), never as floating-point numbers.
  • A balance that cannot be read answers 503 DEPENDENCY_UNAVAILABLE, never zero. Retry it.
  • The balance needs an account with a wallet: a provisioning or provisioning_failed account answers 409 ACCOUNT_NOT_ACTIVE. A suspended account can still be read.
  • Trades reserve nothing; only pending withdrawals are held, in availableAtomic. A trade and a withdrawal that race for the same USDC are decided on chain: one of them fails cleanly, and the account is never overdrawn.

With the SDK

With @kashdao/sdk 0.4.0, kash.balance.get reads the balance for the account you pass as account:

Positions and the portfolio

GET /v1/portfolio and GET /v1/portfolio/positions work for a partner account exactly as for a user key, with the Kash-Account header. See Portfolio & redemptions.

Winnings

When a market resolves, the account’s winnings are paid into its wallet automatically, and you receive payout.completed with the amount that arrived. It is how you learn that an account’s balance rose after a resolution. If automatic payouts are ever paused, a winning position can be claimed with POST /v1/redemptions and the Kash-Account header, as for any user. See Portfolio & redemptions.

Next

Markets, quotes and trading

Show prices and place trades for an account.

Withdrawals

Send USDC back to the user’s registered destination.