Performance Optimization with Compression
To improve the efficiency and performance of data transfer, we enforce compression when interacting with our Market Data APIs. Using compression reduces the size of the data payload, allowing for faster fetch times and better bandwidth utilization.Supported Compression Methods
Our API supports the following compression methods via theAccept-Encoding
header:
- gzip (default and recommended)
- deflate
- br (Brotli)
Benefits of Compression
- Faster Data Transfers: Smaller payloads reduce the time needed to fetch data, especially for endpoints returning large datasets
- Efficient Bandwidth Usage: Compression minimizes data transfer costs by reducing the volume of data sent over the network
- Broad Compatibility: Widely supported compression methods like gzip ensure compatibility across most HTTP clients
- Future-Ready: Prepares you for upcoming mandatory compression requirements
Implementation Examples
cURL
Python (Requests Library)
JavaScript (Fetch API)
Postman
- Go to the Headers tab in your request
- Add
Accept-Encoding
as the header key andgzip
as the value - Send the request and observe the compressed data being returned
Query Parameters
Some endpoints have optional query parameters which attach additional data in the response. Below is a comprehensive list of those parameters and their respective responses.Validation Method
Query parameter:validationMethod
All blockchain related endpoints have the option to return the necessary data used to prove the validity of the associated data returned with the response.
Value | Description |
---|---|
none | Default. No validation data is returned in the response |
basic | Returns validation information about the principal components of a block |
full* | Returns all of the validation information about the components of a block, and each of its sub-components (transactions and uncles). This allows one to fully verify a block and each of its component |
Example Response: Block Validation
Example Response: Transaction Validation
Include Price
Query parameter:includePrice
Value | Description |
---|---|
true | Include price data |
false | Default. Don’t include price data |
Example Response
Currency
(To be used in conjunction withincludePrice
)
Query parameter: currency
Options: usd
btc
eth
(These vary by endpoint)
Value | Description |
---|---|
usd | United States Dollar |
btc | Bitcoin (coming soon) |
eth | Ether (coming soon) |
includePrice
parameter.
Example Response
Page Parameter
Query parameter:page
Options: 0 - ∞
Some endpoints contain the column names in the metadata instead of a next
field to retrieve the URL of the next page of data. Therefore, you will need to use the page
parameter to loop through all pages of data returned, which begins at page 0
for all endpoints where this query parameter is available.