Using the API


To communicate with the tickers backend servers, you have to send a valid JSON object as https POST request to the correct endpoint. The response to the request is also a JSON object. The backend expects the request in UTF8 encoding.

Sample Code

Sample code using different programming languages is available for free on Github. You can directly download and test the code, as a valid apitoken is provided which points to the API Test Ticker .

Request


Every request is represented by a JSON object sent to the backend servers. While the keys in the request object depend on endpoint, the key apitoken is required for every request. If the apitoken is not defined, the request will fail independently of the endpoint and all the other keys.

	                {
  "apitoken": string
}
Key  
apitoken The API token generated by the app. Should be uppercase, no spaces.

Response


The response to your request will be represented by a JSON object which also holds two objects. The result object will hold the requested information depending on the endpoint. If an error occured, the error object will be a key-value dictionary with the error(s) and result will be null.

	                {
  "result": object
  "error": object
}
Key  
result Depending on the request, result will hold the data of the response. If an error occurrs, it will be null.
error If the request is malformed, error will be a key-value dictionary holding the error(s). Otherwise, it will be null.