Introduction
Overview of the TakeProfit Partner APIs and how they can be used to access financial data, security information, manage security links and more.
Whether you’re a developer looking to retrieve market data or manage your own securities, this documentation will help you get started quickly.
Improvement suggestions: We welcome your feedback and suggestions for improving our APIs. Please reach out to us at support@takeprofit.com with any suggestions or questions.
Overview
The TakeProfit APIs provide partners with financial data and integration tools. Our APIs include:
Security Linking
Manage the linkage between your own securities and those provided by TakeProfit.
Reference Data
Retrieve detailed information on financial instruments, exchanges, and other entities.
Market Data
Access real-time and historical market data across various asset classes.
This suite ensures seamless access to essential data and simplifies integration with partner systems.
High-Level Workflow
Workflow Example
Credentials API
The Credentials API is your entry point. It allows you to authenticate and receive tokens for accessing other APIs securely.
Usage Flow
- Create Token: Send your
api_key
to receive tokens. - Refresh Token: Use the
refresh_token
to obtain a newaccess_token
when needed.
Note: The lifetime of the
access_token
is 30 minutes.
Example: Logging In
Response
Note: Keep your tokens secure and never expose them publicly.
Best Practices
Secure Storage
- Protect Credentials: Store your
api_key
,access_token
, andrefresh_token
securely. - Avoid Exposure: Do not expose tokens in client-side code or public repositories.
Token Management
- Monitor Expiration: Keep track of token
valid_to_time
to refresh tokens proactively. Token lifetime is 30 minutes. - Handle Failures: Implement retry logic for token refresh failures.
Error Handling
- Check Status Codes: Always check the
status.code
in responses. - Log Errors: Log error messages for troubleshooting, but avoid logging sensitive information.
Rate Limiting
- Be Mindful: Respect any rate limits to avoid service interruptions.
- Implement Backoff: Use exponential backoff strategies when retrying requests.
FAQs
How do I obtain an api_key
?
Contact our sales team at support@takeprofit.com to obtain your unique api_key
.
What should I do if my access_token
expires?
Use the refresh_token
with the Auth API’s Refresh
method to obtain a new access_token
.
Example: Refreshing Token
Are all times in UTC?
Yes, all times provided by the APIs are in UTC.
Feedback
We value your feedback! If you have suggestions or find any issues, please let us know at support@takeprofit.com.