Bitpanda Enterprise
  1. WebSocket
Bitpanda Enterprise
  • Bitpanda Enterprise
    • Getting Started
      • Overview
      • Authentication
      • Versioning and API Changes
      • Changelog
    • REST API Endpoints
      • Overview
      • Auth Tokens
        • Obtain a Refresh and Access Tokens
        • Revoke a Refresh Token
      • User Administration
        • Individual Users
          • Create new user
          • Get user list v2
          • Search for users
          • Get user details v2
          • Update an existing user
          • Get user details
          • Off-boarding user
          • Inactivate user
          • Get user accepted Terms & Conditions
          • Get user accepted Terms & Conditions v2
          • User verification files
          • Get account levels
        • Businesses
          • Get risk questions
          • Get a list of available businesses
          • Create new business
          • Get business details
          • Update an existing business
          • Create Authorized Individual
          • Get a list of Authorized Individuals
          • Get Authorized Individual details
          • Update Authorized Individual
          • Delete Authorized Individual
          • Create Shareholder
          • Get a list of Shareholders
          • Get Shareholder details
          • Update Shareholder
          • Delete Shareholder
          • Create Beneficial Owner
          • Get a list of Beneficial Owners
          • Get Beneficial Owner details
          • Update Beneficial Owner
          • Delete Beneficial Owner
          • Create Managing Director
          • Get a list of Managing Directors
          • Get Managing Director details
          • Update Managing Director
          • Delete Managing Director
          • Create Individual
          • Get a list of Individuals
          • Get Individual details
          • Update Individual
          • Delete Individual
        • User Files
          • Upload a file
          • Get file contents
          • Get file information
        • Legal & Regulatory
          • Get Terms & Conditions
          • Get Terms & Conditions v2
          • Get AML questions
          • Get appropriateness questions
          • Get client categorization questionnaire
          • Get DAC8 questionnaire
          • Get FATCA questionnaire
          • Get Legal Documents
          • Capture consent for User's final check
          • Retrieve Tax Identification Number Configuration
          • Get UK appropriateness questionnaire
          • Get appropriateness questionnaire for complex products
          • Get client categorization questionnaire
          • Get UK Risk Disclosure Warning
          • Acknowledge UK Risk Disclosure Warning
          • Get user compliance status
      • Asset Oversight
        • Available Assets
          • Get a list of available assets
          • Get a list of available assets v2
        • Asset Details
          • Get asset details
          • Get asset details v2
        • Asset History
          • Get asset history
          • Get asset history
        • Asset Info
          • Get asset information
          • Get asset information
        • Cryptocoin Details
          • Get cryptocoin details
          • Get cryptocoin details
        • Metal Details
          • Get metal details
          • Get metal details
        • Crypto Index Details
          • Get crypto index details
          • Get crypto index details
        • Stock Details
          • Get stock details
          • Get stock details
        • Equity Stock Details
          • Get equity stock details
          • Get equity stock details V2
        • ETF Details
          • Get ETF details
          • Get ETF details
        • Equity ETF Details
          • Get equity ETF details
          • Get equity ETF details V2
        • ETC Details
          • Get ETC details
          • Get ETC details
        • Equity ETC Details
          • Get Equity ETC details
          • Get Equity ETC details V2
        • Token Details
          • Get token details
          • Get token details
        • Asset ESG Data
          • Get asset ESG data
          • Get asset ESG data V2
        • List all available fiats per partner
        • Get the exchange rate for two assets
        • Get the swap exchange rate between two assets
        • Get assets under management
        • Get assets under management grouped by type
        • Get crypto index allocations
        • Get asset tags mapping
        • Get prices
        • Get prices V2
      • Trading Capabilities
        • Trades
          • Create a trade offer
          • Create a trade offer V2
          • [Deprecated] Accept a trade offer
          • Accept a trade offer V2
          • Accept a trade offer V3
          • Get a trade offer status
        • Swaps
          • Create a swap offer
          • Create a swap offer V2
          • Accept a swap offer
          • Accept a swap offer V2
        • Automated Orders
          • List automated orders
          • Get automated order price estimation
          • Create an automated order
          • Get an automated order details
          • Cancel an automated order
      • Portfolio Management
        • Returns the list of owned assets
        • Returns the list of owned asset groups
        • Portfolio performance based on timeframe
        • Returns the enhanced portfolio detail of an asset
        • Returns the list of owned assets
        • Returns the list of owned asset groups
        • Portfolio performance based on timeframe
        • Returns the enhanced portfolio detail of an asset
      • Transactions Timeline
        • All
          • Transaction timeline per user
        • Trades
          • List all trades per user
          • Get trade details
          • Get trades history for user using asset and fiat uuid
          • Search for trades
          • Lightweight Search for trades V2
        • Swaps
          • Search for swaps
          • Swap details by swap offer ID
          • Search for swaps V2
          • Swap details by swap offer ID V2
        • Crypto Transfers
          • List all crypto transfers per user
          • Search for crypto transfers
        • Non-User Initiated Transactions
          • Non-user initiated transaction details
          • List all non-user initiated transactions per partner or per user
          • List all non-user initiated transactions per partner or per user V2
        • Corporate Actions
          • List all corporate actions per partner or per user
          • Corporate action details
        • Crypto Actions
          • Crypto action details V2
          • Crypto action details
        • Staking Actions
          • List all staking actions per user
          • List all staking actions per user V2
      • Reports
        • Get all available report types per user
        • Get all generated reports per user
        • Create Account Statement Report
        • Download a specific report
      • Tax Insights
        • Get user’s tax eligibility status
        • Update user’s tax eligibility status
        • Get trade tax details
      • Notification Events
        • List all notification events per partner
      • Smart Investment Features
        • Crypto Transfers
          • List external addresses
          • Create deposit address
          • Update external address
          • Create withdrawal address
          • List of VASPs
          • Validate crypto address
          • Update tax declaration status for a crypto deposit transaction
          • Create a crypto withdrawal offer
          • Confirm a withdrawal offer
        • Crypto Staking
          • Get staking overview
          • Get bonded overview
          • Stake a crypto asset
          • Unstake a crypto asset
          • Stake a crypto asset V2
          • Unstake a crypto asset V2
          • Get a staking action status
        • Savings Plans
          • Create a savings plan
          • Search for savings plans
          • Cancel a savings plan
          • Cancel a savings plan V2
          • Confirm a savings plan transaction
          • Confirm a savings plan transaction V2
          • Create a savings plan V2
          • Search for savings plans V2
          • Get savings plan next recurrence date.
      • Settlements
        • List all available fiats per partner
        • Create a settlement deposit
        • Update the fiat stock
        • List all settlement transactions per partner
    • Webhooks
      • Overview
      • Setting Up Webhooks
      • Handling Webhooks Events
        • User Updates Notifications
          • User Updates Notifications
        • Corporate Actions Notifications
          • Corporate Actions Notifications
          • Corporate Actions Notifications
        • Crypto Transfers Notifications
          • Deposit or withdrawal notification
        • Settlement Notifications
          • Top-Up Request
          • Top-Up Request V2
          • Top-Up Success
          • Top-Up Success V2
          • Send Money
          • Send Money V2
          • Send Money Success
          • Send Money Success V2
        • Non-user Initiated Transactions Notifications
          • Non-user Initiated Transactions
          • Non-user Initiated Transactions V2
          • Non-user Initiated Transactions V3
        • Savings Plans Notifications
          • Savings Plan Upcoming Trade
          • Savings Plan Upcoming Trade v2
          • Savings Plan Successful Trade
          • Savings Plan Failed Trade
          • Savings Plan Auto Cancel
        • Crypto Actions Notifications
          • Crypto Actions Notifications
        • Reports Notifications
          • Reports Notifications
        • Automated Orders Notifications
          • Automated Orders Notifications
    • WebSocket
      • Overview
      • Setting a Websocket
      • Websocket Server Documentation
    • Glosary
      • Key Terms and Definitions
    • Schemas
      • 400
      • 401
      • 403
      • UserJourney
      • 404
      • trades-search-lightweight
      • 413
      • TradeDetails
      • 422
      • CreateOfferRequest
      • 500
      • CreateOfferUUIDRequest
      • AccessToken
      • ListOrderResponse
      • getTransactionResponse
      • CreateOrderRequest
      • getFiatsResponse
      • CreateOrderResponse
      • GetOrderResponse
      • 405
      • 406
      • 409
      • 410
      • 503
      • Term
      • PaginationMeta
      • PaginationLinks
      • TermV2Link
      • ComplexProductsAnswer
      • TermV2Text
      • ComplexProductsQuestion
      • AmlAnswerNested
      • AmlQuestionNested
      • AmlAnswer
      • AmlQuestion
      • QuestionnaireAnswer
      • QuestionnaireQuestion
      • ClientCategorizationNestedAnswer
      • ClientCategorizationNestedQuestion
      • ClientCategorizationAnswer
      • ClientCategorizationQuestion
      • UKRiskDisclosureContentLink
      • Dac8Answer
      • UKRiskDisclosureContent
      • Dac8Question
      • UKRiskDisclosureActions
      • FatcaAnswer
      • UKRiskDisclosure
      • FatcaQuestion
      • AccountLevel
      • GetUserList
      • SimpleCursorPaginationMeta
      • AmlQuestionAnswerRequest
      • AppropriatenessQuestionAnswerRequest
      • ClientCategorizationQuestionAnswerRequest
      • FatcaQuestionAnswerRequest
      • Dac8QuestionAnswerRequest
      • UserVerificationV2Request
      • UserTax
      • UserMultipleTax
      • UserExtCompliance
      • CreateUserV2RequestBody
      • UserSearch
      • GetUserV2
      • UpdateUserV2RequestBody
      • GetUser
      • UserOffBoardingRequestBody
      • UserAcceptedTerm
      • UserAcceptedTermV2Link
      • UserAcceptedTermV2Text
      • ComplianceDetails
      • UserVerificationFilesV2RequestBody
      • UserComplianceV2
      • LegalDocument
      • UserComplianceV2Response
      • TaxRules
      • Asset
      • AssetHistory
      • AssetInfo
      • CryptoIndexAllocation
      • CoinDetails
      • MetalDetails
      • CryptoIndexDetails
      • YearlyNetIncome
      • StockDetails
      • EquityStockDetails
      • ETFDetails
      • EquityETFDetails
      • ETCDetails
      • EquityETCDetails
      • TokenDetails
      • ESGData
      • ExchangeRate
      • SwapExchangeRate
      • Asset-V2
      • GetAssetsUnderManagement
      • GetAssetsUnderManagementTypeGroup
      • FiatV2
      • TagGroup
      • TagsMapping
      • Trade
      • TradeV2
      • TransactionTimelineItem
      • TradeSearchV2
      • NextPrevCursorPagination
      • CorporateActions
      • CorporateActionDetailsAsset
      • CorporateActionDetailsFiat
      • CorporateActionDetails
      • NonUserInitiatedTransactionsDetailsAsset
      • NonUserInitiatedTransactionDetailsFiat
      • NonUserInitiatedTransactionsDetails
      • CryptoActionDetailsAsset
      • CryptoActionDetailsFiat
      • CryptoActionDetails
      • CryptoActionDetailsAssetV2
      • CryptoActionTransaction
      • CryptoActionDetailsV2
      • Warnings
      • Offer
      • OfferUUID
      • Offer-Accept
      • Offer-Accept-Uuid
      • Overview
      • GroupOverview
      • Performance
      • AssetDetailsEnhancedWithStaking
      • OverviewV2
      • AssetDetailsEnhancedWithStakingV2
      • Fiat
      • CreateDomainDepositRequestBody
      • UpdateFiatStockRequestBody
      • TransactionSearch
      • CreateAccountStatement
      • AccountStatementReportResponse
      • ReportDetails
      • UploadFileRequestBody
      • FileInformation
      • OverviewResponse
      • BondedOverviewResponse
      • StakeRequest
      • StakeResponse
      • PendingStakeActionResponse
      • UnstakeRequest
      • UnstakeResponse
      • SearchResponse
      • SearchV2Response
      • PaginationMetaV2
      • StakeV2Request
      • StakeV2Response
      • UnstakeV2Request
      • UnstakeV2Response
      • GetStatusResponse
      • EventV2
      • NonUserInitiatedTransactions
      • NonUserInitiatedTransactionsV2
      • GetPricesResponse
      • GetPricesResponse-v2
      • GetTaxStatusResponse
      • OrderPriceEstimationResponse
      • UpdateTaxStatusRequest
      • UpdateTaxStatusResponse
      • GetTaxDetailsResponse
      • AddressResponse
      • CreateAddressRequest
      • DepositAddressResponse
      • UpdateExternalAddressRequest
      • CreateWithdrawalAddressRequest
      • VaspResponse
      • ValidateCryptoAddressRequest
      • ValidateCryptoAddressResponse
      • TransactionResponse
      • TaxDeclarationUpdateRequest
      • WithdrawalOfferRequest
      • WithdrawalOfferResponse
      • WithdrawalResponse
      • SearchSavingsPlanResponse
      • CreateSavingsPlanRequest
      • CreateSavingsPlanResponse
      • ModifySavingsPlanRequest
      • ModifySavingsPlanResponse
      • CancelSavingsPlanV2Response
      • ConfirmSavingsPlanTransactionResponse
      • ConfirmSavingsPlanTransactionV2Response
      • SearchSavingsPlanV2Response
      • CreateSavingsPlanV2Request
      • CreateSavingsPlanV2Response
      • GetSavingsPlanNextRecurrenceResponse
      • CreateSwapOfferRequest
      • CreateSwapOfferResponse
      • SwapTradesSearch
      • GetSwap
      • CreateSwapOfferRequestV2
      • CreateSwapOfferResponseV2
      • SwapTradesSearchV2
      • GetSwapV2
      • AcceptSwapOfferResponse
      • AcceptSwapOfferResponseV2
      • ResponseMeta
      • RiskAnswer
      • RiskQuestion
      • GeneralAddress
      • EntityTaxClassification
      • Business
      • RiskQuestionAnswerRequest
      • CreateBusinessRequestBody
      • BusinessDetails
      • UpdateBusinessRequestBody
      • AuthorizedIndividual
      • CreateAuthorizedIndividualRequestBody
      • UpdateAuthorizedIndividualRequestBody
      • Shareholder
      • CreateShareholderRequestBody
      • UpdateShareholderRequestBody
      • BeneficialOwnerType
      • BeneficialOwnerControllingPersonType
      • BeneficialOwner
      • CreateBeneficialOwnerRequestBody
      • UpdateBeneficialOwnerRequestBody
      • ManagingDirector
      • CreateManagingDirectorRequestBody
      • UpdateManagingDirectorRequestBody
      • Individual
      • CreateIndividualRequestBody
      • UpdateIndividualRequestBody
  • Custody
    • Introduction
    • Security
    • Getting Started
    • Changelog
    • Webhooks
    • Supported Assets
    • Glossary
    • Tutorials
      • API Onboarding
      • TrustVault Node.js SDK
      • Change Wallet Policy API
      • Create a Bitcoin Transaction
      • Create an Ethereum Transaction
      • Create Transaction (Unsupported EVM chain)
      • Create Ethereum Transaction GraphQL API
      • Calculating Transaction Fee
      • Decoding an Ethereum Transaction Webhook Payload
      • Get User Portfolio
      • Environments
    • APIs
      • Travel Rule API
      • Deprecations
      • Trust API
        • Authentication
          • TrustVault Public Keys
        • Query
          • User
            • User SubWallets - Details
            • User SubWallets - Portfolio
            • User SubWallets - Balances
            • Get Transactions
            • Get Transactions for a BTC Receive Address
            • Get All BTC Receive Addresses (With Transactions)
            • Get User Portfolio
            • csvPortfolio
          • Get Request Item
        • Mutations
          • Create Transactions
            • Create BTC Transaction
            • Create ETH
            • Create Transaction (EVM compatible chain)
            • Create Exchange Transfer
          • Create Change Policy Request
          • Create Bitcoin Receive Address
          • Add Signature
          • Cancel request
          • Create Sub Wallet
          • Create Eth Personal Sign
          • Create Eth Signed Typed Data
          • Create Radix Transaction
          • Create Xdc.Network Transaction
    • Under the Hood
      • Understanding Bitcoin
      • Supported Ethereum Decoded Data
  • Crypto Pay by Bitpanda
    • Overview
    • REST API Endpoints
      • Authentication
        • Obtain a Refresh and Access Tokens
        • Revoke a Refresh Token
      • Transactions
        • Get transaction details
        • Create a new transaction
        • Get transactions details
      • Get list of fiat currencies
    • Webhooks
      • Settlement Update Notifications
      • Transaction Update Notifications
    • Schemas
      • 400
      • 401
      • 403
      • 404
      • 413
      • 422
      • 500
      • AccessToken
      • getTransactionResponse
      • getFiatsResponse
  1. WebSocket

Websocket Server Documentation

Subscribing to channels#

There are several channels that you can subscribe to. Each channel represents a different type of event that you can listen to.
To subscribe to a channel, you need to send a subscribe message to the websocket server, after you establish a connection to our websocket server. Below is an example of how to subscribe to the prices channel.
{
  "action": "subscribe",
  "channel": "prices-v1",
  "payload": [
    {
      "type": "cr",
      "asset": "BTC",
      "fiat": "EUR"
    },
    {
      "type": "s",
      "asset": "AAPL",
      "fiat": "EUR"
    }
  ]
}
Where:
action is the action that you wants to perform. Supported actions are: subscribe or unsubscribe.
channel is the channel that you want to subscribe to. You can subscribe to multiple channels on the same connection, or you can open multiple connections to subscribe to different channels.
payload is an array of objects containing the following fields:
type is the type of the asset. It can be cr for crypto, s for securities, f for fiat, i for index, co for commodity, es for equity_security.
asset is the asset symbol.
fiat is the fiat symbol
The value can be missing and in that case it is assumed that you want to subscribe to all asset-fiat pairs.
You can only subscribe to assets that are associated with your domain.
The payload can also be of the form {"fiat": "EUR"} which would indicate subscription to all assets against the indicated fiat.
Take into account that you cannot mix subscription types. On the same subscription action, you can only subscribe to one of:
an asset list
all assets against a specific fiat or more than one fiat.
all assets against all fiats.
The above rules apply for both channels that are available for subscription.

Examples#

Subscribe to a list of assets#

{
  "action": "subscribe",
  "channel": "prices-v1",
  "payload": [
    {
      "type": "cr",
      "asset": "BTC",
      "fiat": "EUR"
    },
    {
      "type": "s",
      "asset": "AAPL",
      "fiat": "EUR"
    }
  ]
}

Subscribe to all assets against a specific fiat#

{
  "action": "subscribe",
  "channel": "prices-v1",
  "payload": [
    {
      "fiat": "EUR"
    }
  ]
}

Subscribe to all assets against multiple fiats#

{
  "action": "subscribe",
  "channel": "prices-v1",
  "payload": [
    {
      "fiat": "EUR"
    },
    {
      "fiat": "USD"
    }
  ]
}

Subscribe to all assets against all fiats#

{
  "action": "subscribe",
  "channel": "prices-v1"
}

Success messages#

For each action taken, if the action was successful, you will receive a success message from the server.
Here is an example of a success message:
{
    "action": "subscribe",
    "channel": "prices-v1",
    "status": "success"
}

Error messages#

If there is an error in the subscription message, you will receive an error message from the server.
Here are some examples of error messages:

Invalid channel#

{
  "action": "subscribe",
  "channel": "non-existent-channel",
  "error": "channel not supported"
}

Invalid fiat#

{
  "action": "subscribe",
  "channel": "price-changes-v1",
  "error": "fiat not found: XXX"
}
Where XXX is the symbol of the fiat that you tried to subscribe to and is not supported.

Asset not found for domain#

{
  "action": "subscribe",
  "channel": "price-changes-v1",
  "error": "asset not found for domain: ABC"
}
Where ABC is the symbol of the asset that you tried to subscribe to and is not associated with your domain.

Supported Channels#

The following channels are available for subscription:
prices-v1: This channel provides real-time price updates for assets. Each asset-fiat pair receives an update roughly every 15 seconds.
price-changes-v1: This channel provides real-time price changes for assets.

Price Updates#

Below is an example of a message that you will receive when you subscribe to the prices-v1 channel.
{
  "AP":"65544.85350",
  "BP":"65217.84675",
  "U": 1706521791,
  "T": "cr",
  "A": "BTC",
  "F": "EUR",
  "CH": "prices-v1"
}
Where:
AP is the ask price
BP is the bid price
U is the unix timestamp of the update
T is the type of the asset. It can be cr for crypto, s for securities, f for fiat, i for index, co for commodity, es for equity_security.
A is the asset symbol
F is the fiat symbol
CH is the channel

Price Changes#

Below is an example of a message that you will receive when you subscribe to the price-changes-v1 channel.
{
  "T": "cr",
  "A": "BTC",
  "F": "EUR",
  "CH": "price-changes-v1",
  "D": "-1.5133276010318143",
  "I": "1.273209549071618",
  "W": "-1.8677176148046607",
  "M": "0.297723292469352",
  "6M": "-7.9408455232277769",
  "Y": "-24.3261099365750529",
  "5Y": "-26.7534660050135571",
  "DV": "-0.88",
  "IV": "0.72",
  "WV": "-1.09",
  "MV": "0.17",
  "6MV": "-4.94",
  "YV": "-18.41",
  "5YV": "-20.918",
  "MVOL": "0.1185439986130654"
}
Where:
T is the type of the asset. It can be cr for crypto, s for securities, f for fiat, i for index, co for commodity, es for equity_security.
A is the asset symbol
F is the fiat symbol
CH is the channel
D is the daily change in %
I is the intraday change in %
W is the weekly change in %
M is the monthly change in %
6M is the 6 month change in %
Y is the yearly change in %
5Y is the 5 year change in %
DV is the daily change in value
IV is the intraday change in value
WV is the weekly change in value
MV is the monthly change in value
6MV is the 6 month change in value
YV is the yearly change in value
5YV is the 5 year change in value
MVOL is the monthly volatility
Be advised that price changes are available only for EUR for now. Subscription to other fiats will work, but you will not receive any messages for those fiats.

Unsubscribing from channels#

To unsubscribe from a channel, you need to send an unsubscribe message to the websocket server. Below is an example of how to unsubscribe from the prices channel.
{
  "action": "unsubscribe",
  "channel": "prices-v1"
}
You cannot unsubscribe selectively from assets. You can only unsubscribe from the entire channel.

Ping/Pong#

Our websocket server supports ping/pong messages, in accordance with RFC 6455.
If the connection is idle for one minute or more, the server will close the connection. In order to avoid this, you need to send a ping message to the server at least once per minute. The server will respond with a pong message.

Supported fiats and assets#

Fiats: Price changes are available only for EUR for now. Subscription to other fiats will work, but you will not receive any messages for those fiats.
Assets: You can only subscribe to assets that are associated with your domain.
Previous
Setting a Websocket
Next
Key Terms and Definitions
Built with