WebSocket Integration
Last updated
Last updated
WebSocket integration serves as an alternative to HTTPS integration. While the overall flow remains the same, WebSocket allows you to stream order book data to Native instead of having Native pull the data from your server.
Native's WebSocket URL is hosted at: https://newapi.native.org/v1/pmm/ws
.
To authenticate all incoming requests, you need to include the api_key
in the headers. You can obtain an api_key
by requesting it from the Native team, as the API key needs to be manually whitelisted for access to the WebSocket URL.
To fully integrate with Native and utilize its full capabilities, you must implement and handle the following message types:
: Enables Native to estimate prices for different order sizes.
: Allows Native to obtain a price from you for the requested token and amount.
: Enables you to validate and sign the order for on-chain execution.