XTB Online Investing icon

XTB Data API: Endpoints and Fields

XTB S.A. · Banking

XTB Online Investing is the Android trading and investing app from Warsaw-listed broker XTB S.A., bringing its xStation platform to clients trading CFDs on forex, indices, commodities, crypto and individual stocks as well as cash equities and ETFs. Its features include template-based investment plans, an e-wallet with physical and virtual cards, junior accounts and the Polish AVD Standard retirement account. Clients sign in with a username and password, with optional OTP verification and a trusted-device fingerprint, then switch between demo and live accounts, use charts, place CFD and cash-equity orders, view live margin and profit updates, read XNews and the economic calendar, set price alerts, and deposit or withdraw funds; identity verification uses Fourthline or Kycaid. As the mobile counterpart to xStation 5, it serves self-directed retail traders across continental Europe, Chile, Indonesia, Vietnam and the UAE, alongside eToro, Plus500, IG, Trading 212 and Trade Republic for users who want both CFD trading and stock investing under one login.

Person-level margin snapshots pair equityMargin with equityMarginLevel and marginLevel, alongside netProfit and netProfitPercent. Closed-position records add instrumentId, positionSide, displayAssetClass and origin to per-lot profit figures. Wallet results group currency and customerStatus under success or failed, with deposit details carrying an IBAN inside bankAccountNumber. Card records expose cardStatus, cardIssuer and cardLimitUsageStatus; stored funding cards are linked by creditCardXtId.

Risk teams can monitor margin compression, tax-lot tools can separate CFD and cash-equity outcomes, and treasury integrations can compare requestedAmount with feeData and methodTitle before a withdrawal. The internalTransferAllowed flag helps distinguish eligible internal moves. openData Studio turns these margin, portfolio and wallet fields into callable open data.

Screenshots

  • XTB Online Investing screenshot 1
  • XTB Online Investing screenshot 2
  • XTB Online Investing screenshot 3
  • XTB Online Investing screenshot 4
  • XTB Online Investing screenshot 5
  • XTB Online Investing screenshot 6
  • XTB Online Investing screenshot 7
  • XTB Online Investing screenshot 8

API surface

The endpoints and request/response examples below are reconstructed from the app's interface — illustrative, not a live capture.

  • CAS ticket-granting ticket

    POST /v1/identity/sessions openbanking

    Exchanges username, password and fingerprint for a CAS ticket-granting ticket, loginPhase and an optional OTP window described by otpTimeToLive, otpTokenCount and phoneNumber.

    Auth: Unauthenticated. Body carries username, password, rememberMe and fingerprint. The resulting CAS ticket and loginPhase gate later service access; OTP may be required.

    • username
    • password
    • rememberMe
    • fingerprint
    • success
    • loginPhase
    • ticket
    • authType
    • otpTimeToLive
    • otpTokenCount
    • otpThrottleTimeRemaining
    • phoneNumber
    POST /v1/identity/sessions HTTP/1.1
    Content-Type: application/json
    
    {
      "username": "<example-username>",
      "password": "<example-password>",
      "rememberMe": true,
      "fingerprint": "<example-device-fingerprint>"
    }
    {
      "success": true,
      "loginPhase": "AUTHENTICATED",
      "ticket": "<example-ticket-granting-ticket>",
      "authType": "PASSWORD",
      "otpTimeToLive": 60,
      "otpTokenCount": 0,
      "otpThrottleTimeRemaining": null,
      "phoneNumber": null
    }
  • CAS service ticket

    POST /v1/identity/service-grants openbanking

    Mints a one-time serviceTicket from a ticket-granting ticket for a selected authenticated service.

    Auth: CAS ticket-granting ticket in the tgt body field. The one-time serviceTicket authorizes a selected service and supports the bearer-token exchange.

    • tgt
    • service
    • success
    • serviceTicket
    POST /v1/identity/service-grants HTTP/1.1
    Content-Type: application/json
    
    {
      "tgt": "<example-ticket-granting-ticket>",
      "service": "<example-service-identifier>"
    }
    {
      "success": true,
      "serviceTicket": "<example-service-ticket>"
    }
  • Person balance summary stream

    POST /v1/risk/person-snapshots/stream openfinance

    Server-streams person-level margin and profit summaries: equityMargin, equityMarginLevel, marginLevel, netProfit and netProfitPercent.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • equityMargin
    • equityMarginLevel
    • marginLevel
    • netProfit
    • netProfitPercent
    • valueProfitSummaryType
    POST /v1/risk/person-snapshots/stream HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {
      "accountId": "<example-account-id>"
    }
    {
      "equityMargin": "15000.00",
      "equityMarginLevel": "750.00",
      "marginLevel": "750.00",
      "netProfit": "180.00",
      "netProfitPercent": "1.20",
      "valueProfitSummaryType": "PERSON"
    }
  • E-wallet account balances

    POST /v1/wallets/balance-snapshots openbanking

    Reads multi-currency e-wallet account balance results through success or failed, with currency and customerStatus for each account.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • success
    • failed
    • currency
    • customerStatus
    POST /v1/wallets/balance-snapshots HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {}
    {
      "success": {
        "accounts": [
          {
            "currency": "EUR",
            "customerStatus": "ACTIVE"
          }
        ]
      },
      "failed": null
    }
  • E-wallet account details

    POST /v1/wallets/deposit-details openbanking

    Loads an e-wallet account's bankAccountNumber, including its iban, and customerStatus for the deposit-details screen.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • success
    • failed
    • bankAccountNumber
    • iban
    • customerStatus
    POST /v1/wallets/deposit-details HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {
      "currency": "EUR"
    }
    {
      "success": {
        "bankAccountNumber": {
          "iban": "<example-iban>"
        },
        "customerStatus": "ACTIVE"
      },
      "failed": null
    }
  • E-wallet card limits

    POST /v1/wallets/spending-status openbanking

    Reads e-wallet card spending-limit state through cardStatus, cardIssuer and cardLimitUsageStatus.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • success
    • failed
    • cardStatus
    • cardIssuer
    • cardLimitUsageStatus
    POST /v1/wallets/spending-status HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {
      "cardId": "<example-card-id>"
    }
    {
      "success": {
        "cardStatus": "ACTIVE",
        "cardIssuer": "MASTERCARD",
        "cardLimitUsageStatus": "OK"
      },
      "failed": null
    }
  • Credit-card details

    POST /v1/funding/stored-cards/lookup openbanking

    Loads a stored funding card by creditCardXtId, returning cardName and cardIssuer for deposit or recurring-payment screens.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • creditCardXtId
    • cardName
    • cardIssuer
    • success
    • failed
    POST /v1/funding/stored-cards/lookup HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {
      "creditCardXtId": "<example-funding-card-id>"
    }
    {
      "success": {
        "creditCardXtId": "<example-funding-card-id>",
        "cardName": "Example funding card",
        "cardIssuer": "VISA"
      },
      "failed": null
    }
  • Closed positions

    POST /v1/portfolios/realized-lots/search openfinance

    Pages closed positions by instrumentId, positionSide, displayAssetClass and origin, with netProfit and netProfitPercent for each lot.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • instrumentId
    • positionSide
    • displayAssetClass
    • netProfit
    • netProfitPercent
    • origin
    POST /v1/portfolios/realized-lots/search HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {
      "accountId": "<example-account-id>",
      "displayAssetClass": "CFD_FOREX"
    }
    {
      "positions": [
        {
          "instrumentId": {
            "symbol": "EURUSD"
          },
          "positionSide": "BUY",
          "displayAssetClass": "CFD_FOREX",
          "netProfit": "35.00",
          "netProfitPercent": "0.80",
          "origin": "MANUAL"
        }
      ]
    }
  • Withdrawal summary

    POST /v1/payouts/fee-preview openbanking

    Previews a withdrawal using tradingAccount, requestedAmount, feeData, methodTitle, methodDescription and optional cardName, cardIssuer and etaTranslationKeys.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • tradingAccount
    • requestedAmount
    • feeData
    • methodTitle
    • methodDescription
    • cardName
    • cardIssuer
    • etaTranslationKeys
    POST /v1/payouts/fee-preview HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {
      "tradingAccount": "<example-account-id>",
      "requestedAmount": {
        "value": "350.00",
        "currency": "EUR"
      }
    }
    {
      "tradingAccount": "<example-account-id>",
      "requestedAmount": {
        "value": "350.00",
        "currency": "EUR"
      },
      "feeData": {
        "fee": "0.00",
        "currency": "EUR"
      },
      "methodTitle": "Bank transfer",
      "methodDescription": "Illustrative withdrawal method",
      "cardName": null,
      "cardIssuer": null,
      "etaTranslationKeys": []
    }
  • Trading accounts with transfer limits

    POST /v1/transfers/eligible-books openfinance

    Lists trading accounts available to the transfer chooser, their accountId and accountType, and whether internalTransferAllowed is enabled.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • internalTransferAllowed
    • accountId
    • accountType
    POST /v1/transfers/eligible-books HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {}
    {
      "internalTransferAllowed": true,
      "accounts": [
        {
          "accountId": "<example-account-id>",
          "accountType": "REAL"
        }
      ]
    }
  • Price-alert subscriptions

    POST /v1/alerts/price-rules/search opendata

    Lists active price-alert subscriptions by symbol, type and price for the alerts screen.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • success
    • symbol
    • type
    • price
    POST /v1/alerts/price-rules/search HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {}
    {
      "success": {
        "subscriptions": [
          {
            "symbol": "EURUSD",
            "type": "ABOVE",
            "price": "1.0900"
          }
        ]
      }
    }
  • Instrument info header

    POST /v1/catalog/instrument-cards opendata

    Loads an instrument information header with displayName, description, logoUrl and displayAssetClass, keyed by accountId, instrumentIdType and instrumentIdValue.

    Auth: gRPC metadata Authorization: Bearer <accessToken> from the signed-in CAS session.

    • accountId
    • instrumentIdType
    • instrumentIdValue
    • displayName
    • description
    • logoUrl
    • displayAssetClass
    POST /v1/catalog/instrument-cards HTTP/2
    Authorization: Bearer <accessToken>
    Content-Type: application/json
    
    {
      "accountId": "<example-account-id>",
      "instrumentIdType": "SYMBOL",
      "instrumentIdValue": "EURUSD"
    }
    {
      "accountId": "<example-account-id>",
      "instrumentIdType": "SYMBOL",
      "instrumentIdValue": "EURUSD",
      "displayName": "EUR/USD",
      "description": "Euro vs US Dollar",
      "logoUrl": "<example-logo-url>",
      "displayAssetClass": "CFD_FOREX"
    }

Data categories

  • CAS tickets
  • margin and equity
  • unrealized P&L
  • e-wallet balances
  • IBAN payment addresses
  • card spend limits
  • funding cards
  • closed positions
  • withdrawal fees
  • internal transfers
  • price alerts
  • instrument catalog

Where teams use this data

  • Live margin-call ticker

    Risk desks subscribe to person-summary ticks and alert when equityMarginLevel or marginLevel compresses against equityMargin, pairing netProfit / netProfitPercent so a CFD book is not waiting on the next poll.

  • Closed-lot tax lots

    Year-end harvest jobs page closed positions by displayAssetClass and positionSide, summing netProfit and netProfitPercent per instrumentId so CFD vs cash-equity P&L land in the right wrapper.

  • E-wallet card cap watch

    Expense tools read cardStatus, cardIssuer and cardLimitUsageStatus on the e-wallet card, and match funding cards by creditCardXtId / cardName so a freeze or issuer change is visible the same day.

  • Withdrawal fee preview

    Treasury quotes requestedAmount against feeData and methodTitle before sending, and checks internalTransferAllowed plus tradingAccount so an internal book move is not billed as an external SEPA.

Frequently asked questions

What trading and wallet data does the XTB app expose?

The documented models cover a person-level margin and profit stream (equityMargin, equityMarginLevel, marginLevel, netProfit), multi-currency wallet account results (currency, customerStatus), an IBAN within bankAccountNumber, card and spending-limit status (cardStatus, cardIssuer, cardLimitUsageStatus), closed-position profit (instrumentId, positionSide, displayAssetClass, netProfit), withdrawal previews (requestedAmount, feeData, methodTitle), and internal-transfer eligibility (internalTransferAllowed).

How does the app authenticate API calls?

Username, password and a device fingerprint obtain a CAS ticket-granting ticket (ticket, loginPhase). A one-time serviceTicket supports the access-token exchange; authenticated account calls use Authorization: Bearer. When the sign-in step requests OTP, authType, otpTimeToLive and phoneNumber describe the verification window. The paths and examples on this page are illustrative, not production connection details.

Which markets are covered?

XTB S.A. is Warsaw-listed; the app includes country configurations for Germany, Spain, France, Chile, Indonesia, Vietnam and the UAE. The data models describe a signed-in mobile session. These illustrative paths do not establish a public developer program or production access.

Do the models include closed-position P&L and numerical card limits?

Closed-position records include netProfit and netProfitPercent for each instrumentId, positionSide and displayAssetClass. The wallet-card model provides cardLimitUsageStatus alongside cardStatus and cardIssuer, but the listed fields do not specify a numerical spending cap or remaining allowance. Stored funding cards are identified separately by creditCardXtId, with cardName and cardIssuer.

Apps similar to XTB Online Investing

  • Trading 212: Stocks, ETFs, ISA — Trading 212 is a London-headquartered European brokerage, founded in Bulgaria in 2004, that offers commission-free listed equities and ETFs alongside CFDs, and in 2024 it introduced a debit card.
  • Trade Republic: Broker & Bank — Trade Republic is a Berlin online broker and bank, founded in 2015, whose mobile app offers brokerage and, after a 2023 European Central Bank banking licence, savings and current-account products.
  • eToro — eToro is an Israeli multinational, founded in Tel Aviv in 2007, that operates an electronic trading platform and social trading system for retail clients.
  • Plus500 — Plus500 is a Haifa-headquartered multi-asset fintech, listed on the London Stock Exchange, that offers CFDs, share dealing, futures, prediction markets and options on futures.
  • IG — IG Group is a London-based online trading and investment provider, established in 1974, that offers spread betting, US futures and options, and stock and crypto trading, with its UK businesses regulated by the FCA.
  • Interactive Brokers — Interactive Brokers is a Greenwich, Connecticut brokerage that provides automated trade execution and custody for stocks, options, futures, foreign exchange, bonds and funds on electronic markets worldwide.
  • DEGIRO — DEGIRO is a Dutch online brokerage brand, launched for retail investors in the Netherlands in 2013 and later rolled out across Europe, now operating as the Dutch branch of Flatexdegiro Bank.
  • MetaTrader 4 Forex Trading — MetaTrader 4 is MetaQuotes Software's 2005 electronic trading platform, licensed to forex brokers so clients can stream prices, chart markets, place orders and manage accounts.

Topics

  • XTB API
  • XTB equityMargin
  • XTB netProfit
  • XTB e-wallet
  • xStation mobile API
  • XTB closed positions
  • XTB withdrawal fee
  • CFD broker data API

Need this app's data API integrated?

We deliver scoped integrations for any named app — from USD 500 with source-code handoff, or hosted access billed per call. Tell us the data you need.

  • NDA + SOW on every engagement
  • Delivery in 3–7 days
  • Payment only after acceptance
  • Work scoped to authorized use

Get a quote