API Documentation
stake.ch Public API
Email: [email protected]
What is API?
stake.ch application programming interface (API) allows our clients to access and control their accounts, using custom written software.
Responsive codes/coding
Response codes/coding is a key that can be added to an API coding as response_code(string). Furthermore, explanation may or may not be supplied as the response_explanation(string) key, which defines information about what went wrong when processing a request.
You will find below the list of all available response codes and it’s explanations:
response_code | response_explanation(optional) |
404 | Unknown validation error |
401 | Request rejected/exceeded rate limit |
900 | Arbitrage is disabled for specific account type |
008 | Insufficient balance for provided user |
029 | ‘stop_order_id’ |
028 | ‘stop_order_price’ |
038 | Provided order size is too large |
037 | Provided order amount is too large |
311 | Open orders present |
302 | Order has not been found |
501 | Error while serializing data |
611 | Unknown matching engine error |
679 | Error at cancelling orders |
517 | Error at cancelling orders |
522 | Instant staking provider is disabled |
521 | Staking is enabled |
001 | Matching order enabled |
002 | Matching order disabled |
Request limits
All investors can make 400 requests per second. The rate limits mentioned above can be increased upon request and the client entering a bespoke agreement with stake.ch
Commercial use of stake.ch exchange data
Companies seeking to utilize stake.ch exchange data for their own commercial purposes are requested to contact [email protected] to receive and sign a commercial use Data License Agreement.
Authentication
All private API require authentication. For a successful authentication you need to provide the following authorization headers in your request.
Code | Reason | Action |
API0001 API0002 API0003 API0004 API0005 API0006 API0007 API0008 API0009 API0010 | API key not found IP address not allowed No permission found Invalid nonce Invalid digital signature Your account is frozen Authentication failed Update your profile Invalid version Wrong API key format Please make sure url string is not too long | Check your API key value This IP address cannot be accessed API key access is forbidden on endpoint Check your nonce value Digital signature doesn’t match Contact support Find customer with API key Check informations on your account Check the ‘v2’ in the authorization key Check if your API key string is correct Total length of the url does not exceed 2000 characters |
y_authorization
Format: stake.ch {api_key}
Security: API key
Header: y-authorization
Security
Collection of security related endpoints
API access
Revoke all API keys across all user’s accounts