Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

accountStatus

Whether a TxFlow account exists for an address and whether it may place orders.

Use it to decide what to prompt for before a user signs anything: a deposit, an access code, or nothing. eligible folds both checks into one boolean; reason says which one failed.

This endpoint is a pre-check, not an authority. POST /exchange does the binding validation and answers No trading account found. Please deposit first. when an account is missing — handle that rejection regardless of what this returns.

A malformed user is rejected with 400, so a typo cannot come back looking permissive.

POST/account-statustype accountStatus

Decide whether to prompt for a deposit or an access code before a user signs anything.

Request body
typestringrequired

Must be `accountStatus`.

"accountStatus"
userstring · addressrequired

Account to query. Must be a valid EVM address — a malformed value is rejected with `400` rather than answered, so a typo cannot read as a permissive result.

channelinteger · uint32optional

Sub-exchange to evaluate against. Defaults to `0` (the main TxFlow exchange). `1` is the Outcome (prediction market) sub-exchange. A channel that is not configured is refused rather than defaulted — `eligible` is `false` with reason `Unknown channel`.

Request example
curl -X POST https://rpc.txflow-testnet.xyz/account-status \
  -H "Content-Type: application/json" \
  -H "x-api-version: 2026-08-16" \
  -d '{
  "type": "accountStatus",
  "user": "0x0000000000000000000000000000000000000001"
}'
Try it
POST https://rpc.txflow-testnet.xyz/account-status
Response · AccountStatusResponse 200
codeinteger

`0` on success.

dataAccountStatusResponse
channelinteger · uint32
checkedboolean

Whether `exists` is a real answer. When `false`, the account-existence check is not active on the host you queried and `exists` is a placeholder `true` — treat it as unknown. Always read this before branching on `exists`.

eligibleboolean

Whether the account can place orders right now: the access-code gate permits it, and (when `checked`) the account exists. A best-effort pre-check — `POST /exchange` remains the authority.

existsboolean

Whether a TxFlow account exists for this address — that is, whether a deposit or `tokenSend` has ever landed on chain. **Only meaningful when `checked` is `true`.**

userstring · address

Echo of the requested address, lowercased.

reasonstring

Why `eligible` is `false`; omitted when `eligible` is `true`. One of `Exchange is not allowed`, `User is blacklisted`, `User not in whitelist`, `User not authorized for this channel`, `Unknown channel`, `No trading account found`, or a string starting `db_service unavailable:`.

successboolean

`false` on error, with `code` set and the text in `message` instead of `data`.

Response example
{
  "success": true,
  "code": 0,
  "data": {
    "user": "0x0000000000000000000000000000000000000001",
    "channel": 0,
    "exists": true,
    "checked": true,
    "eligible": true
  }
}

Next steps

Check whether a code is needed at all with accessCodeStatus.