Skip to content

GuestSession

Restores the guest identity associated with the request cookie, or creates one guest customer and one guest trading account for the brand resolved from the request hostname. Repeated requests with a valid cookie restore the same customer and account and extend the inactivity expiry.

Endpoint

POST /session/guest

Authorization

No bearer token is required. Send a same-origin browser request with credentials enabled and an empty JSON object. The endpoint is HTTP-only and applies the platform's origin check. Do not read or construct the guest cookie in JavaScript. The server sets it as an HttpOnly cookie.

{}

The response sets __Host-ion_guest with Path=/, Max-Age=2592000, HttpOnly, Secure, and SameSite=Lax. It is host-only (no Domain attribute). The opaque cookie value is not included in the JSON response. A guest session expires after 30 days without activity; restoring or using it extends that period.

The guest starts with zero balance and customer deposit/withdrawal permissions disabled. A newly created account uses the brand's configured guest group. An existing guest account keeps its assigned group after the brand's default guest group changes, provided that group remains enabled and belongs to the same brand. Guest sessions can use ordinary account read endpoints allowed to SESSION_USER, including trade, trade-history, and exposure reads, subject to the same account ownership checks. Guest accounts can also use account-scoped helper operations, including settings, market watch, notifications, price alerts, and their own scripts. Trade mutations are unavailable. Guests cannot deposit, withdraw, transfer funds, or create additional accounts. Account creation, financial operations, and SSO require registration. The guest JWT is not accepted for authenticated Data Lake access; public endpoints retain their existing access rules. The assigned group continues to determine normal account behavior if the customer later registers.

Guest requests are limited to 60 requests per minute per source IP and brand. Creating new guest identities is additionally limited to 10 per hour per source IP and brand. The server bounds its rate-limit state to 10,000 IP/brand windows and accepts at most 100,000 guest records.

Success response

{
  "id": 100001,
  "login": 100001,
  "customer_id": 8101,
  "guest": true,
  "guest_expires_at": 1793347200,
  "regdate": 1790755200,
  "leverage": 100,
  "email": "[email protected]",
  "avatar": "",
  "name": "Guest",
  "phone": "",
  "address": "",
  "city": "",
  "state": "",
  "country": "",
  "zipcode": "",
  "group": "demo-guest",
  "currency": "USD",
  "money_digits": 2,
  "__token": "<Ed25519 guest session JWT>"
}

__token is the platform session token. It has the configured ordinary session TTL and carries the guest session identity. The response also sets the secure guest cookie described above. guest_expires_at is a Unix timestamp in seconds. The guest JWT identifies the guest with auth_kind: "guest", a guest UUID in guest_id, and the associated customer_id. It is a platform session token and is not accepted for Data Lake authentication.

Response Parameters

Field Type Description
id integer Trading account login.
login integer Trading account login.
customer_id integer Guest customer record identifier.
guest boolean True while the identity is a guest.
guest_expires_at integer Guest inactivity-expiration time as Unix seconds.
regdate integer Account registration time as Unix seconds.
leverage integer Leverage assigned to the account.
email string Account email.
avatar string Avatar reference or empty string.
name string Account name.
phone string Account phone.
address string Account address.
city string Account city.
state string Account state or region.
country string Account country.
zipcode string Account postal code.
group string Assigned account group.
currency string Account currency from the assigned group.
money_digits integer Fractional digits for account-currency money values, joined from the assigned group currency.
__token string Ed25519 platform session JWT for this guest identity.

Errors

HTTP Error Description
403 GUEST_TRANSPORT_REQUIRED The request did not use HTTP.
403 GUEST_ORIGIN_DENIED The request failed the platform origin check.
403 BRAND_NOT_AVAILABLE The hostname's brand is disabled or not admitted.
403 GUEST_DISABLED Guest access is disabled or the configured guest group is invalid or disabled.
403 GUEST_SESSION_REQUIRED The cookie does not resolve to an active guest identity for this brand.
404 BRAND_NOT_FOUND The request hostname does not resolve to a configured brand.
409 SESSION_ALREADY_AUTHENTICATED An already-authenticated non-guest session attempted to start a guest session.
429 GUEST_RATE_LIMITED Guest request or guest-creation rate limit was reached.
503 GUEST_UNAVAILABLE Guest service or session admission is unavailable.