Special discount! Up to 50% off!
Home Buy Data Subscribe API Support My Account

Historical data compression

Our servers use the Accept-Encoding HTTP header to determine whether to compress historical data sent to the client application. The default and recommended compression algorithm is gzip.

We strongly suggest using the compression in your applications in order to increase performance and reduce download times. You can enable it by sending the correct Accept-Encoding HTTP header and then processing the received data appropriately. We have included the source code examples of the correct procedure in C# and VB.NET programming languages. There is also an open-source application you can use to see how to automatically decompress incoming data.

Client Side

Here is a typical set of headers sent by Firefox:

Host

api.kibot.com

User-Agent

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0

Accept

text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language

en-us,en;q=0.5

Accept-Encoding

gzip, deflate

Accept-Charset

ISO-8859-1,utf-8;q=0.7,*;q=0.7

Connection

keep-alive

Cookie

 

Cache-Control

max-age=0

 

Server Side

When such request is sent, the server uses the Accept-Encoding header to see which compression methods are supported by the client. If a compatible method is found, the data is compressed before it is sent to the client. The client then decompresses the data locally.

Here is the typical response sent by the server:

Connection

Keep-Alive

Date

Tue, 30 Aug 2011 18:21:46 GMT

Content-Type

text/plain

Server

Microsoft-IIS/7.5

Cache-Control

private

X-AspNet-Version

4.0.30319

X-Powered-By

ASP.NET

Content-Encoding

gzip

Vary

Accept-Encoding

Transfer-Encoding

chunked

 

The client reads the Content-Encoding header and is able to recognize that the data is compressed using the gzip compression algorithm. Click here to see the example of how the request/response operations are processed in C# and VB.NET programming languages.




Historical Data API - Table of Contents

Introduction
    Historical data API  
    Overview
    How to get access
Commands
    Login request
    Download historical data
    Stock data adjustments
    Logout request
    Status
    Snapshot
Examples
    Sample source code
    Sample client application
Other
    Data compression
    Server responses