Hosted venue accounts
Provision a hosted BetDEX account, fund it with Solana USDC, and track withdrawals.
sufwan-local-test hosts a BetDEX account for the signed-in user. Authenticate with x-app-id and
Authorization: Bearer. These endpoints currently support the venue slug betdex.
Send { "mode": "live" } as the request body. Provisioning returns the account with HTTP 200
or 202; read the account status before requesting its deposit address.
const account = await client.provisionHostedVenueAccount("betdex", { mode: "live" });Full shape on Provision hosted venue account. Read it back with Get hosted venue account.
Deposit address
Deposit Solana USDC to the address returned for this hosted account. It credits the BetDEX account, separately from the managed balance described in Funding.
const deposit = await client.getHostedVenueDepositAddress("betdex");Full shape on Get hosted venue deposit address.
Withdraw
amountRaw is 6-decimal USDC ("1000000" is 1 USDC). requestId is a UUID v4 and is the idempotency key. The response decimals is 6.
const withdrawal = await client.withdrawHostedVenue("betdex", {
mode: "live",
requestId, // UUID v4
amountRaw: "1000000", // 1 USDC, 6 decimals
destinationAddress,
});Full shape on Withdraw hosted venue funds. Poll Get hosted venue withdrawal.
Get hosted venue account activity returns signed exact 18-decimal amounts. That scale is only on the activity ledger.