Introduction
TradingPartners AI is a platform that allows professionals to receive live alerts on trading opportunities.
These trading strategies are derived from our AI-enhanced trading algorithm, which scans hundreds of values in real time.
How does TradingPartners AI work?
How it works is very simple.
FREE
users can retrieve closed won alerts every 15 minutes, while FULL
have access to a Server-Sent Event endpoint that will send the alerts in real time.
You will receive the different states of an opportunity alert.
TradingPartners AI also offers a range of APIs enabling you to obtain a history of alerts obtained, obtain statistics on these alerts, modify your account and much more.
A web interface for viewing this information is also available.
Web Interface
Even if TradingPartners AI backend offers Restful APIs to manage practically every aspect of your journey, we recommend you to use the Web Interface, https://app.tradingpartners.ai, to perform certain actions.
You can easily :
- create an account
- login
- reset your password
- subscribe
- see your statistics and alerts
- manage your account
The Web Interface is a simple and intuitive interface to perform those actions.
Sign in
You can create an account using the Registration page accessible directly by :
- clicking the link
- going to the TradingPartners AI home page and clicking on the
REQUEST ACCESS
link in the header.
To sign up, you must :
- agree to the terms and conditions.
- be a financial market professional.
- agree and understand that the information you will receive can only be shared with your clients.
Form description
Field | Description | Required |
---|---|---|
Company section | ||
Name | Name of your company | true |
Sector | Sector industry of your company | true |
Website | URL of your company website, if you have one | false |
Address | Address of your company headquarters. This field has autocompletion. |
true |
ZipCode | Zip code of your company headquarters. | true |
City | City of your company headquarters. | true |
Country | Country of your company. | true |
Contact section | ||
Name | First name of your company contact | true |
Surname | Last name of your company contact | true |
Email address used to contact your company. NOTE: This email address will be used as your login ! |
true |
|
Password | Password for your account. Password should :
|
true |
Confirm Password | Confirm your password. | true |
Phone number | Phone number, preceded by your country code, to contact your company. | true |
Once you have successfully submit your form, if everything is correct, you will receive an email with an activation link.
You can not access our APIs until you activate your account.
Login
Once you have created and activated your account (cf. Sign in page), you can now log in using your email
and password
.
You can go directly to the login page by
- clicking the link
- going to the TradingPartners AI home page and clicking on the
LOGIN
link in the header.
Form description
Field | Description | Required |
---|---|---|
Email of your company contact. | true |
|
Password | The password you set. If you have forgotten your password, you can request a password reset. |
true |
You can request a password reset using the link Forgot your password?
at the bottom right of the login form.
Reset password
If you have forgotten you password, you can request a personal link to reset it by clicking on the Forgot your password?
at the bottom right of the login page.
Request a reset link
Once you have clicked on the request password link, a modal will appear with an input field for you to enter your company email
address.
After submitting the form, the backend will perform some verification on your account.
If everything is OK, you will receive an email with a link to reset your password.
Form description
Field | Description | Required |
---|---|---|
Password | Password for your account. Password should :
|
true |
Confirm password | Confirm your password. | true |
Dashboard
Once you've logged in, you will have access to the Dashboard page.
This page will display statistics and your alerts history.
Statistics
Here is an example of the user statistics.
In this example, the user has only subscribed to the Cryptocurrencies
market, so he won't receive any other alerts.
He is a FULL API access
user, so it has also received invalidated alerts.
Dashboard
The dashboard regroups all the alerts received by the user by reception date
, ticker
, markets
, strategy duration
, status
and gain
.
The user can sort his history and filter by date
, ticker
, market
and status
.
Here are all the information you will find on the alerts :
Field | Description |
---|---|
access date |
Date of alert reception by the user. |
ticker |
Ticker of the alert. |
instrument |
Market of the alert. |
strategy duration |
Type of the strategy. |
status |
Status of the alert. |
gain |
Gain of the closed alert. |
start |
Starting price of the alert. |
stop |
StopLoss value of the alert. |
target |
Target aimed by the alert. |
exit |
Actual closing price of the alert. |
startedAt |
Detection date of the alert. |
closedAt |
Closing date of the alert. |
Profile
You can manage your account using the Profile page accessible directly by :
- clicking the link
- going to the TradingPartners AI home page and clicking on the
PROFILE
link in the header.
The page is separated into 3 sections :
Company information
The company information
section is used to see or update the company information of your account, or delete it.
Edition
To edit your company information
, you have to click on the button.
This will display the form to edit your company information.
Deletion
To close his account, a user can click on the Close my account
button.
To confirm the deletion you will have to type your password.
All the data related to the user account will be lost.
If the user had a subscription, it will be cancelled and all its credits will be lost.
Subscription
The subscription section
is used to see the current state of your subscription and your available payment methods.
From this section, you can link
or unlink
a bank card from your account, subscribe
or cancel
your subscription and see your available credits amount
.
FULL API access
users can choose to deactivate their subscription automatic renewal, or reactivate it.
Preferences
The preferences section
is where the user manage its alerts preferences.
The user can select the markets
he is interested in as well as the type of strategy (short
or long
) he is interested in.
Strategies terminal
A user with FULL API access
can receive alerts in real time.
But he might not have a dev teams nor a particular network account to push the alert onto.
That what the strategies terminal is for. By opening the terminal and connecting, the user will start to receive opportunities when the system detects them.
Toggle the terminal window
In order to make the terminal appear, the user must click on the ➕ button at the bottom right of the page.
Connection
Once the terminal is opened, the user can move it or resize it at will.
It can also start to receive strategies by clicking on the Connect
button.
Upon connection, the user will start to receive alerts in real time.
API Reference
The TradingPartners AI API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Most of our endpoints require a bearer token for request authentication. The token must be provided in the Authorization
header of the request.
You can use the TradingPartners AI API in test mode, which doesn't affect live data nor interact with the TradingPartners AI Core. The token you use to authenticate the request determines whether the request is a live mode or test mode.
You will find the test tokens on the dedicated page.
You can also retrieve a valid token using the Login API, only usable if you have an account. You can create an account using the Registration page.
You can find the OpenAPI document here.
Errors
Like all APIs, TradingPartners AI can occasionally encounter errors.
These can be linked to a user request, or to an internal problem.
We will try to describe the different alerts you may encounter and how to deal with them.
In most cases, an error will be accompanied by a description
field that will give you more information about the error.
Bad request - 400
Bad requests errors are usually caused by an invalid request send by the user.
Usually, some changes in the request can fix the problem.
The main 400 Bad Request
errors are :
Error code | Message | Hint |
---|---|---|
20 | invalid body | The body might be malformed |
21 | missing body field | The body is missing a required field |
22 | invalid body field | The body has an invalid field |
23 | missing path param | A mandatory path param is missing |
24 | invalid path param | A path param is invalid |
Unauthorized - 401
Unauthorised errors are usually caused by a session relative issue or invalid credentials.
Refresh your token, verify your Authorization
header and token type might fix the problem for Authorization
related
issues, or check your credentials depending on the request.
The main 401 Unauthorized
errors are :
Error code | Message | Hint |
---|---|---|
10 | missing authorization header | The Authorization header is missing |
11 | invalid authorization header | The Authorization header is invalid |
12 | session expired | The session has expired, try to login again |
13 | invalid email/password combination | The credentials are invalid |
Payment required - 402
Payment required error only appears when the user tries to reach an endpoint that requires a FULL API access
subscription.
Try to subscribe before your next try !
If the user has a FULL API access
subscription, and he has deactivated the automatic renewal mechanism, he might also receive this error.
Indeed, if he is currently connected to the alerts stream, once his last credit is consumed, the connection will automatically closed and the last message received will be the payment required
error.
Error code | Message | Hint |
---|---|---|
30 | Not enough credit | User has not enough credit to access the API |
Forbidden - 403
Forbidden errors are usually caused by a lack of permissions or a non activated account.
The main 403 Forbidden
errors are :
Error code | Message | Hint |
---|---|---|
32 | User not active | User has not activated his account. Check your emails to find the activation link. |
Not found - 404
Not found errors usually occur when the user tries to reach an endpoint that does not exist, or when the user tries to work on a non-existing resource.
The main 404 Not found
errors are :
Error code | Message | Hint |
---|---|---|
4 | Not found | The endpoint does not exist |
40 | User not found | The user does not exist |
41 | Token not found | The token does not exist or has expired |
Too many requests - 429
Too many requests error only appears when a FREE API access
user tries to request an endpoint that is limited
to FREE
users too soon.
If a FREE
user requests the closed alerts endpoint, get at least one alert, and do not wait 15m
before requesting again, he will receive the Too many requests
error.
Error code | Message | Hint |
---|---|---|
50 | Only one request per 15mn is allowed | The user has already requested the endpoint every 15 minutes. Try again in 15 minutes. |
Internal server error - 5XX
Internal server errors are usually caused by an internal issue.
User, usually can do nothing about it but to contact the technical support.
Error code | Message |
---|---|
99 | Internal error |
General statistics
TradingPartners AI uses a proven algorithm to provide you, professionals, with alerts on trading opportunities.
We send more than 10k alerts every month, with an average of 65% winning alerts.
To get the latest statistics, you can request our General statistics endpoint by sending a GET
request to TradingPartners AI Backend.
GET https://api.tradingpartners.ai/api/v1/statistics
Statistics response object
Attributes
commodities - object
Statistics of commodities markets
aborted - number fmt:float64
Amount of invalidated commodities alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost commodities alerts.
total - number fmt:float64
Amount of commodities alerts.
won - number fmt:float64
Amount of won commodities alerts.
crypto - object
Statistics of cryptocurrencies markets
aborted - number fmt:float64
Amount of invalidated cryptocurrencies alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost cryptocurrencies alerts.
total - number fmt:float64
Amount of cryptocurrencies alerts.
won - number fmt:float64
Amount of won cryptocurrencies alerts.
forex - object
Statistics of forex markets
aborted - number fmt:float64
Amount of invalidated forex alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost forex alerts.
total - number fmt:float64
Amount of forex alerts.
won - number fmt:float64
Amount of won forex alerts.
futures - object
Statistics of futures markets
aborted - number fmt:float64
Amount of invalidated futures alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost futures alerts.
total - number fmt:float64
Amount of futures alerts.
won - number fmt:float64
Amount of won futures alerts.
indices - object
Statistics of indices markets
aborted - number fmt:float64
Amount of invalidated indices alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost indices alerts.
total - number fmt:float64
Amount of indices alerts.
won - number fmt:float64
Amount of won indices alerts.
stocks - object
Statistics of stocks markets
aborted - number fmt:float64
Amount of invalidated stocks alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost stocks alerts.
total - number fmt:float64
Amount of stocks alerts.
won - number fmt:float64
Amount of won stocks alerts.
etfs - object
Statistics of etfs markets
aborted - number fmt:float64
Amount of invalidated etfs alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost etfs alerts.
total - number fmt:float64
Amount of etfs alerts.
won - number fmt:float64
Amount of won etfs alerts.
{
"commodities": {
"aborted": 0,
"lost": 1,
"total": 4,
"won": 3
},
"crypto": {
"aborted": 186,
"lost": 194,
"total": 582,
"won": 202
},
"forex": {
"aborted": 0,
"lost": 8,
"total": 34,
"won": 26
},
"futures": {
"aborted": 246,
"lost": 98,
"total": 498,
"won": 154
},
"indices": {
"aborted": 11,
"lost": 20,
"total": 54,
"won": 23
},
"stocks": {
"aborted": 0,
"lost": 36,
"total": 211,
"won": 175
},
"etfs": {
"aborted": 0,
"lost": 0,
"total": 0,
"won": 0
}
}
Login
TradingPartners AI uses a bearer token to authenticate requests.
A token has a validity period. Once it has expired, you will be asked to recreate one using this login API.
The Server-Sent Event endpoint won't ask you to renew your token once connected to it.
To get a token, you must first create an account. You can do so using the Registration page.
You can then send a POST
request to TradingPartners AI.
POST https://api.tradingpartners.ai/api/v1/users/login
Credentials object
Attributes
email - string min:1 max:255
Email address of the company contact
password - string min:1 max:30
Password of the company
Login response object
Attributes
accessToken - string max:4096
access-token to join for authenticated request
tokenType - string
access-token type
expiresIn - number fmt:float64
access-token duration in seconds
lastLogin - nullable string fmt:date-time
last login datetime
Test Tokens
From now on, the API will need a token retrieve via the Login API.
But for the developers to perform some tests, you might need a way to produce them.
By using a test token, you will receive errors on demands, but also valid answers.
It is to be noted, these answers are fake, they are not live data, but are statics responses only for you to test your integration with our backends.
Here are the test tokens available and what they do :
Description | Token |
---|---|
A token of a FREE user | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJmb3IiOiJ1c2VyIiwid2l0aCI6ImdyYWRlIiwiZnVsbCI6ZmFsc2V9.ePzQQPaA8INNX7CFR9vOO-SdFHJe-GSuA-enbz76fIQ |
A token of a FULL user | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJmb3IiOiJ1c2VyIiwid2l0aCI6ImdyYWRlIiwiZnVsbCI6dHJ1ZX0.sWNz-Z0oGGWoSwaVlOGyzCQdYCWJQmKSSFvZIJzchZw |
An expired token | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJidXQiOiJpdCIsImlzIjoiZXhwaXJlZCJ9.AHBn-rdXrvKnLgGSqkHU439KBPUWg61UCwI0k_3cMdc |
Wrong credentials | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJidXQiOiJ3aXRoIiwiYmFkIjoiY3JlZGVudGlhbHMifQ.PK_Bdek7KJbCu6SQHyKUj25_N_gjITcUoamLOgzqaRg |
User not found | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJidXQiOiJ1c2VyIiwibm90IjoiZm91bmQifQ.l8HdOhGXKsE1V2fe6_TIdBa6RFbpJhRiaxA7_4jr1n4 |
User not active | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJidXQiOiJ1c2VyIiwibm90IjoiYWN0aXZlIn0.MHlKnkps_2yXtx-1T_TZ8UQkSiI6bQadMPfJygTSIK0 |
User already exists | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJidXQiOiJ1c2VyIiwiYWxyZWFkeSI6ImV4aXN0cyJ9.lMISt0ctcHHUltyRXZzjDdOI-tyEeK6VWaqbqem9Fl4 |
Internal error | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXN0IjoidG9rZW4iLCJidXQiOiJzZXJ2ZXIiLCJlbmNvdW50ZXJlZCI6ImFuIGVycm9yIn0.nc5Z0wkCJM-LhmOROabuwOW6syoWtzmxPOTln-BLUKw |
Users
The TradingPartners AI Users API allows the user to retrieve and manage his account.
He can :
- Get his company information
- Update his company information
- Get his opportunities preferences
- Update his opportunities preferences
- Get his subscription information
- Cancel or reactivate his subscription automatic renewal
- Retrieves his list of cards linked to his account
- Change his default card
- Unlink a card
Retrieve user information
A user should be able to retrieve his company information.
The user should be logged in.
GET https://api.tradingpartners.ai/api/v1/users/info
Get users/info response object
Attributes
name - string max:255
Name of the company
website - nullable string fmt:url max:255
URL of the company website
sector - string enum
Sector of activity of the company
Administration - civil service
Food industry
Arts and crafts
Associations
Banking - insurance - financial services
Wood/Paper/Cardboard/Printing
Public works/construction materials
Chemicals - plastics - packaging
Chemicals/Pharmaceuticals
Retail - mass distribution
Commerce/Trading/Distribution
Communication - marketing - information
Construction - building - public works
Culture - sports - leisure
Publishing/Communications/Multimedia
Electronics/Electricity
Energy
Education - training
Environment - recovery - recycling - water treatment
Equipment - materials for professional activities
Studies and consultancy
Manufacturing - wholesale of articles for sale
Management - business administration
Hotels - catering - tourism
Real estate
Textile industry
Information technology
IT/Telecoms
Design and research engineers - researchers
Logistics - transport
Machinery and equipment Automotive
Electrical - electronic - optical equipment
Mechanics - metallurgy
Metallurgy/Metal working
Ores - minerals - iron and steel
Legal professions
Health - social work
Business services
Services to individuals - communities - companies
Textiles/Clothing/Footwear
Transport/Logistics
address - string max:255
Address of the company
zipCode - string max:10
Address zip code of the company
city - string max:255
City of the company
country - string enum
Company country
Afghanistan
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antigua and Barbuda
Argentina
Armenia
Aruba
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia, Plurinational State of
Bosnia and Herzegovina
Botswana
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo
Congo, The Democratic Republic of the
Cook Islands
Costa Rica
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Holy See (Vatican City State)
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Democratic People's Republic of
Korea, Republic of
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Libyan Arab Jamahiriya
Liechtenstein
Lithuania
Luxembourg
Macao
Macedonia, The Former Yugoslav Republic of
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Réunion
Romania
Russia
Rwanda
Saint Barthélemy
Saint Helena, Ascension and Tristan Da Cunha
Saint Kitts and Nevis
Saint Lucia
Saint Martin
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
São Tomé and Príncipe
Sark Island
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Georgia and the South Sandwich Islands
South Korea
Spain
Sri Lanka
Sudan
Suriname
Svalbard and Jan Mayen
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan, Province of China
Tajikistan
Tanzania, United Republic of
Thailand
Timor-Leste
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
Uruguay
Uzbekistan
Vanuatu
Venezuela, Bolivarian Republic of
Viet Nam
Wallis and Futuna
Yemen
Zambia
Zimbabwe
contact - object
Company contact information
name - string max:255
Company contact firstname.
surname - string max:255
Company contact lastname.
email - string fmt:email max:320
Company contact email.
phone - string max:15
Phone number of the contact.
{
"name": "myCompany",
"website": "https://mycompany.com",
"sector": "Administration - civil service",
"address": "426 Jordy Lodge",
"zipCode": "88120",
"city": "Cartwrightshire",
"country": "Spain",
"contact": {
"name": "John",
"surname": "Doe",
"email": "john.doe@gmail.com",
"phone": "+33666666666"
}
}
Update user information
A user should be able to update his company information.
The user should be logged in.
PUT https://api.tradingpartners.ai/api/v1/users/info
PUT users/info request object
Attributes
name - string max:255
Name of the company
website - nullable string fmt:url max:255
URL of the company website
sector - string enum
Sector of activity of the company
Administration - civil service
Food industry
Arts and crafts
Associations
Banking - insurance - financial services
Wood/Paper/Cardboard/Printing
Public works/construction materials
Chemicals - plastics - packaging
Chemicals/Pharmaceuticals
Retail - mass distribution
Commerce/Trading/Distribution
Communication - marketing - information
Construction - building - public works
Culture - sports - leisure
Publishing/Communications/Multimedia
Electronics/Electricity
Energy
Education - training
Environment - recovery - recycling - water treatment
Equipment - materials for professional activities
Studies and consultancy
Manufacturing - wholesale of articles for sale
Management - business administration
Hotels - catering - tourism
Real estate
Textile industry
Information technology
IT/Telecoms
Design and research engineers - researchers
Logistics - transport
Machinery and equipment Automotive
Electrical - electronic - optical equipment
Mechanics - metallurgy
Metallurgy/Metal working
Ores - minerals - iron and steel
Legal professions
Health - social work
Business services
Services to individuals - communities - companies
Textiles/Clothing/Footwear
Transport/Logistics
address - string max:255
Address of the company
zipCode - string max:10
Address zip code of the company
city - string max:255
City of the company
country - string enum
Company country
Afghanistan
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antigua and Barbuda
Argentina
Armenia
Aruba
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia, Plurinational State of
Bosnia and Herzegovina
Botswana
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo
Congo, The Democratic Republic of the
Cook Islands
Costa Rica
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Holy See (Vatican City State)
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Democratic People's Republic of
Korea, Republic of
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Libyan Arab Jamahiriya
Liechtenstein
Lithuania
Luxembourg
Macao
Macedonia, The Former Yugoslav Republic of
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Réunion
Romania
Russia
Rwanda
Saint Barthélemy
Saint Helena, Ascension and Tristan Da Cunha
Saint Kitts and Nevis
Saint Lucia
Saint Martin
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
São Tomé and Príncipe
Sark Island
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Georgia and the South Sandwich Islands
South Korea
Spain
Sri Lanka
Sudan
Suriname
Svalbard and Jan Mayen
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan, Province of China
Tajikistan
Tanzania, United Republic of
Thailand
Timor-Leste
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
Uruguay
Uzbekistan
Vanuatu
Venezuela, Bolivarian Republic of
Viet Nam
Wallis and Futuna
Yemen
Zambia
Zimbabwe
Administration - civil service
Food industry
Arts and crafts
Associations
Banking - insurance - financial services
Wood/Paper/Cardboard/Printing
Public works/construction materials
Chemicals - plastics - packaging
Chemicals/Pharmaceuticals
Retail - mass distribution
Commerce/Trading/Distribution
Communication - marketing - information
Construction - building - public works
Culture - sports - leisure
Publishing/Communications/Multimedia
Electronics/Electricity
Energy
Education - training
Environment - recovery - recycling - water treatment
Equipment - materials for professional activities
Studies and consultancy
Manufacturing - wholesale of articles for sale
Management - business administration
Hotels - catering - tourism
Real estate
Textile industry
Information technology
IT/Telecoms
Design and research engineers - researchers
Logistics - transport
Machinery and equipment Automotive
Electrical - electronic - optical equipment
Mechanics - metallurgy
Metallurgy/Metal working
Ores - minerals - iron and steel
Legal professions
Health - social work
Business services
Services to individuals - communities - companies
Textiles/Clothing/Footwear
Transport/Logistics
contact - object
Company contact information
name - string max:255
Company contact firstname.
surname - string max:255
Company contact lastname.
email - string fmt:email max:320
Company contact email.
phone - string max:15
Phone number of the contact.
{
"name": "myCompany",
"website": "https://mycompany.com",
"sector": "Administration - civil service",
"address": "426 Jordy Lodge",
"zipCode": "88120",
"city": "Cartwrightshire",
"country": "Spain",
"contact": {
"name": "John",
"surname": "Doe",
"email": "john.doe@gmail.com",
"phone": "+33666666666"
}
}
Response
A valid update of the user information is answered with a 204 status code.
StatusCode: 204
Retrieve user preferences
A user should be able to retrieve his preferences, so he can see what are the markets and strategies types he will receive.
The user should be logged in.
GET https://api.tradingpartners.ai/api/v1/users/preferences
Get users/preferences response object
Attributes
longTermStrategy - boolean
User wants to receive long term strategy.
shortTermStrategy - boolean
User wants to receive long term strategy.
cryptocurrencies - boolean
User wants to receive opportunities on cryptocurrencies
market.
forex - boolean
User wants to receive opportunities on forex
market.
indices - boolean
User wants to receive opportunities on indices
market.
commodities - boolean
User wants to receive opportunities on commodities
market.
futures - boolean
User wants to receive opportunities on futures
market.
stocks - boolean
User wants to receive opportunities on stocks
market.
etfs - boolean
User wants to receive opportunities on etfs
market.
Update user preferences
A user should be able to update his preferences so that he could choose which markets and strategies he will receive.
The user should be logged in.
PUT https://api.tradingpartners.ai/api/v1/users/preferences
PUT users/preferences request object
Attributes
longTermStrategy - boolean
User wants to receive long term strategy.
shortTermStrategy - boolean
User wants to receive long term strategy.
cryptocurrencies - boolean
User wants to receive opportunities on cryptocurrencies
market.
forex - boolean
User wants to receive opportunities on forex
market.
indices - boolean
User wants to receive opportunities on indices
market.
commodities - boolean
User wants to receive opportunities on commodities
market.
futures - boolean
User wants to receive opportunities on futures
market.
stocks - boolean
User wants to receive opportunities on stocks
market.
etfs - boolean
User wants to receive opportunities on etfs
market.
Response
A valid update of the user preferences is answered with a 204 status code.
StatusCode: 204
Retrieve user networks configuration
A user should be able to retrieve his networks configuration, so he can see what are the markets he has configured to receive alerts on.
The user should be logged in.
GET https://api.tradingpartners.ai/api/v1/users/networks
Get users/networks response object
Attributes
telegram - object
Telegram configuration
enabled - boolean
Do you want to send alerts to Telegram.
apiKey - string max:255
API Key used for sending alerts to Telegram.
chatID - string max:255
ID of the chat you want to push the alert to.
instagram - object
Instagram configuration
enabled - boolean
Do you want to send alerts to Instagram.
accessToken - string max:255
Access-token to consume Instagram APIs
onesignal - object
OneSignal configuration
enabled - boolean
Do you want to send alerts to OneSignal.
apiKey - string max:255
API Key to consume OneSignal's APIs
appID - string max:255
The application App ID you want to send notification to.
Update user networks configuration
A user should be able to update his networks configuration so that he could add or remove networks to receive alerts on.
The user should be logged in.
PUT https://api.tradingpartners.ai/api/v1/users/networks
PUT users/networks request object
Attributes
telegram - object
Telegram configuration
enabled - boolean
Do you want to send alerts to Telegram.
apiKey - string max:255
API Key used for sending alerts to Telegram.
chatID - string max:255
ID of the chat you want to push the alert to.
instagram - object
Instagram configuration
enabled - boolean
Do you want to send alerts to Telegram.
accessToken - string max:255
Access-token to consume Instagram APIs
onesignal - object
OneSignal configuration
enabled - boolean
Do you want to send alerts to OneSignal.
apiKey - string max:255
API Key to consume OneSignal's APIs
appID - string max:255
The application App ID you want to send notification to.
Response
A valid update of the user networks is answered with a 204 status code.
StatusCode: 204
Retrieve user subscription
A user should be able to get his subscription information.
For FULL API access
users, this endpoint could be used to see the current balance and the activation status of the automatic renewal.
The user should be logged in.
GET https://api.tradingpartners.ai/api/v1/users/subscription
Get users/subscription response object
Attributes
subscription - string enum
Current subscription plan of the user
FREE
- Free API accessFULL
- Full API access
balance - number fmt:uint64
User current balance.
automaticRenewal - boolean
When a FULL API access
user run out of credits, if set to true
the user will be automatically debited to renew his subscription.
Cards
A user can also manage his bank cards and define one as default, so that the automatic renewal of his subscription will be charged on this card.
Retrieve user's cards
A user should be able to retrieve the list of the cards linked to his account.
The user should be logged in.
GET https://api.tradingpartners.ai/api/v1/users/cards
Get users/cards response object
The response object contains the list of user's cards.
The attributes of a card are:
Attributes
id - string fmt:uuid
Partner's payment service card ID.
isDefault - boolean
true
if the current card is the default one.
isValid - boolean
true
if the current card is still valid (expiration, blocked status, etc).
dsCardNumber - string
Card number. Length might vary depending on the card brand.
dsExpiryDate - string
The expiry date of the card. The format used is YY/MM
.
dsCardBrand - string
The card brand or card scheme (ie. VISA, MasterCard, etc.).
issueAt - string fmt:date-time
Date when the card was linked to the account.
Set user's card as default
A user can choose to automatically renew his subscription or not.
If he has activated automatic renewal, once he will run out of credits, the user will be automatically debited to renew his subscription.
This automatic renewal will be charged on the user's default card.
The user should be able to change his default card as will.
The user should be logged in.
PATCH https://api.tradingpartners.ai/api/v1/users/cards/{id}
Patch users/cards/{id} request object
Path Parameters
id - string fmt:uuid
The id of the card.
Body Attributes
isDefault - boolean
true
if the card should be set as default.
Setting this to
true
will automatically set the other cards tofalse
.
Response
A valid update of the default card is answered with a 204 status code.
StatusCode: 204
Delete a user's card
A user should be able to unlink a card from his account.
The card will be marked as deleted, but some information are kept due to legal reasons and historic purposes.
The user should be logged in.
DELETE https://api.tradingpartners.ai/api/v1/users/cards/{id}
Delete users/cards/{id} request
Response
A valid unlinking of the users card is answered with a 204 status code.
StatusCode: 204
Alerts
The TradingPartners AI Alerts API allows the user to get alerts on opportunities as well as some statistics on what he really received.
He can :
Anatomy of an alert
Our algorithm analyses the different markets to detect opportunities.
The life cycle of an alert is as follows:
working
: an alert that has just been detected by the algorithm is in this state.
The alert can be invalidated, so no action should be taken on receiving it.aborted
: an alert that has been invalidated by the algorithm is in this state.
If the starting price is never reached during a given period, the opportunity is aborted. No action should be taken on receiving it.onGoing
: an alert that has started is in this state.
The reception of this kind of event, might trigger an action on your brokers.closed
: death of an alert.
The alert is closed, so you should also perform an action on your brokers.
Receive alerts in real time
A user with FULL API access
can receive alerts in real time.
To receive the alerts, the user needs to be logged in and to connect to our Server-Sent Events endpoint.
GET https://api.tradingpartners.ai/api/v1/alerts
Server send event objects
The SSE connection is fairly simple.
The client connects to the endpoint and receives events produced by the server.
An event is always formatted as so :
TradingPartners AI produces 5 types of events :
ping
: to keep the connection aliveworking
: an alert that has just been detected by the algorithmaborted
: an alert that has been invalidated by the algorithmonGoing
: an alert that has startedclosed
: closure of an alert
Ping
Ping event is used to keep the connection alive.
Attributes
event - string const:ping
Event ping
to keep the connection alive.
data - object
JSON data of ping
event
ping - string fmt:date-time
Date of the ping
Working
working
event is used to inform the user that an alert has been detected.
Attributes
event - string const:working
Event working
to inform an opportunity might have been detected.
data - object
JSON data of working
event
id - number fmt:int64
ID of the alert
durationStrategy - string
Type of strategy used to detect the alert (cf. Preferences)
instrument - string enum
Markets of the alert
CRYPTOCURRENCIES
FOREX
INDICES
COMMODITIES
FUTURES
STOCKS
ETFS
ticker - string
Ticker concerned by the alert.
start - number fmt:float64
Starting price of the alert.
target - number fmt:float64
Price aimed by the alert.
stop - number fmt:float64
StopLoss price of the alert.
startedAt - string fmt:date-time
Date of alert detection.
token - string fmt:uuid
ID of the credit used for the user to receive the alert.
Aborted
aborted
event is used to inform the user that an alert has been invalidated.
Attributes
event - string const:aborted
Event aborted
to inform the user, the alert has been invalidated.
data - object
JSON data of aborted
event
id - number fmt:int64
ID of the alert
token - string fmt:uuid
ID of the credit used for the user to receive the alert.
tokenState - string enum
State of the credit used for the user to receive the alert.
REIMBURSED
CONSUMED
OnGoing
onGoing
event is used to inform the user that an alert has reached its starting price.
Attributes
event - string const:onGoing
Event onGoing
to inform the user, the alert has started.
data - object
JSON data of onGoing
event
id - number fmt:int64
ID of the alert
token - string fmt:uuid
ID of the credit used for the user to receive the alert.
Closed
closed
event is used to inform the user that an alert has been closed.
It either has reached its stopLoss price or the algorithm has detected the alert should close now and keep the present profits.
Attributes
event - string const:closed
Event closed
to inform the user, the alert has been closed.
data - object
JSON data of aborted
event
id - number fmt:int64
ID of the alert
exit - number fmt:float64
Closing price of the alert.
gain - number fmt:float64
Gain realized by the alert.
A negative gain
means that the alert was a losing one.
A positive gain
does not mean your credit will be consumed.
It will be only if the gain have reached a certain threshold.
closedAt - string fmt:date-time
Date of alert closure.
token - string fmt:uuid
ID of the credit used for the user to receive the alert.
tokenState - string enum
State of the credit used for the user to receive the alert.
REIMBURSED
CONSUMED
Retrieve closed alerts
A FREE API access
user can retrieve the list of alerts that were closed and won in the last 15minutes.
He can only request the list every 15minutes.
A FULL API access
user can retrieve the list of alerts that were closed, whatever their statuses are, in the last 15minutes.
FULL API access
users do not have to wait for 15 minutes.
The user should be logged in.
GET https://api.tradingpartners.ai/api/v1/alerts/closed
Get alerts/closed response object
The response object contains the list of alerts.
The attributes of an alert are:
Attributes
id - integer fmt:int64
ID of the alert.
ticker - string
Ticker concerned by the alert.
instrument - string enum
Markets of the alert
CRYPTOCURRENCIES
FOREX
INDICES
COMMODITIES
FUTURES
STOCKS
ETFS
durationStrategy - string enum
Duration type of the strategy
short
long
direction - string enum
Direction of the strategy
BUY
SELL
start - number fmt:float64
Starting price of the alert.
target - number fmt:float64
Price aimed by the alert.
stop - number fmt:float64
StopLoss price of the alert.
exit - number fmt:float64
Closing price of the alert.
gain - number fmt:float64
Gain realized by the alert.
A negative gain
means that the alert was a losing one.
A positive gain
does not mean your credit will be consumed.
It will be only if the gain have reached a certain threshold.
status - string enum
Final status of the alert
WON
LOST
startedAt - string fmt:date-time
Date of alert detection.
closedAt - string fmt:date-time
Date of alert closure.
[
{
"id": 1234,
"closedAt": "2024-04-07T13:28:46.451608246Z",
"exit": 69531.6,
"durationStrategy": "short",
"direction": "BUY",
"gain": 529.6,
"instrument": "CRYPTOCURRENCIES",
"start": 69002,
"startedAt": "2024-04-07T13:19:46.451608012Z",
"status": "WON",
"stop": 68997,
"target": 69872.4,
"ticker": "BTC/USD"
},
{
"id": 1235,
"closedAt": "2024-04-07T13:27:46.451608481Z",
"exit": 18842,
"durationStrategy": "long",
"direction": "BUY",
"gain": 88,
"instrument": "FUTURES",
"start": 18754,
"startedAt": "2024-04-07T13:17:46.451608374Z",
"status": "WON",
"stop": 18749,
"target": 18836,
"ticker": "FDXM.EUREX.M2024"
},
{
"id": 1236,
"closedAt": "2024-04-07T13:26:46.451609251Z",
"exit": 3233.64,
"durationStrategy": "short",
"direction": "SELL",
"gain": -5,
"instrument": "CRYPTOCURRENCIES",
"start": 3228.64,
"startedAt": "2024-04-07T13:19:46.451609144Z",
"status": "LOST",
"stop": 3233.64,
"target": 3217.4,
"ticker": "ETH/USD"
}
]
User specific history
As a user, I should be able to retrieve the history of alerts I have received.
This endpoint returns the list of alerts received using a pagination mechanism to avoid overloading the API.
It can also filter by :
date
ticker
market
status
and be sorted by:
access date
started date
closed date
ticker
market
figure time
gain
status
GET https://api.tradingpartners.ai/api/v1/alerts/history?page=1&size=10&to=2020-01-01T00:00:00Z&from=2020-01-02T00:00:00Z&ticker=BTC&instrument=CRYPTOCURRENCIES&status=WON&orderBy=accessDate&orderDir=ASC
Request Query Parameters
page - number fmt:int Requested page number.
default is 1
size - number fmt:int Size of a page (amount of alerts returned).
default is 10
from - string fmt:date-time
All alerts accessed after this from
field. In ISO 8601 format.
to - string fmt:date-time
All alerts accessed before this from
field. In ISO 8601 format.
ticker - string
Ticker concerned by the alert.
The filtering is case-insensitive & partial match.
instrument - string enum
Markets of the alert
The filtering is case-sensitive & complete match.
CRYPTOCURRENCIES
FOREX
INDICES
COMMODITIES
FUTURES
STOCKS
ETFS
status - string enum
Status of the alert
The filtering is case-sensitive & complete match.
ONMARK
ONGOING
WON
LOST
ABORTED
orderBy - string enum
Order result by field.
accessDate
startedAt
closedAt
ticker
instrument
figureTime
gain
status
default is
accessDate
orderDir - string enum
Order direction.
asc
desc
default is
desc
History response object
Attributes
total - number fmt:int64 Total amount of alerts matching your filter.
page - number fmt:int Current page number.
size - number fmt:int Size of the page.
data - object
List of alerts matching the filter
id - integer fmt:int64
ID of the alert.
ticker - string
Ticker concerned by the alert.
instrument - string enum
Markets of the alert
CRYPTOCURRENCIES
FOREX
INDICES
COMMODITIES
FUTURES
STOCKS
ETFS
durationStrategy - string enum
Duration type of the strategy
short
long
direction - string enum
Direction of the strategy
BUY
SELL
start - number fmt:float64
Starting price of the alert.
target - number fmt:float64
Price aimed by the alert.
stop - number fmt:float64
StopLoss price of the alert.
startedAt - string fmt:date-time
Date of alert detection.
exit - nullable number fmt:float64
Closing price of the alert.
gain - nullable number fmt:float64
Gain realized by the alert.
A negative gain
means that the alert was a losing one.
A positive gain
does not mean your credit will be consumed.
It will be only if the gain have reached a certain threshold.
status - nullable string enum
Final status of the alert
WON
LOST
closedAt - nullable string fmt:date-time
Date of alert closure.
{
"data": [
{
"id": 1234,
"accessDate": "2024-01-12T14:44:01Z",
"durationStrategy": "short",
"direction": "SELL",
"instrument": "CRYPTOCURRENCIES",
"start": 3228.64,
"startedAt": "2024-01-12T14:44:00Z",
"stop": 3233.64,
"target": 3217.4,
"ticker": "ETH/USD"
},
{
"id": 1233,
"accessDate": "2024-01-02T13:34:00Z",
"closedAt": "2024-01-02T13:33:00Z",
"exit": 18842,
"durationStrategy": "long",
"direction": "BUY",
"gain": 88,
"instrument": "FUTURES",
"start": 18754,
"startedAt": "2024-01-02T13:24:00Z",
"status": "WON",
"stop": 18749,
"target": 18836,
"ticker": "FDXM.EUREX.M2024"
},
{
"id": 1232,
"accessDate": "2024-01-01T00:04:00Z",
"closedAt": "2024-01-01T00:03:00Z",
"exit": 69531.6,
"durationStrategy": "short",
"direction": "BUY",
"gain": 529.6,
"instrument": "CRYPTOCURRENCIES",
"start": 69002,
"startedAt": "2024-01-01T00:00:00Z",
"status": "WON",
"stop": 68997,
"target": 69872.4,
"ticker": "BTC/USD"
}
],
"page": 1,
"size": 10,
"total": 3
}
User specific statistics
As a user, I should be able to know how many alerts I have received.
This endpoint returns the amount of alerts received, by markets, by final status.
It can also filter by date
.
GET https://api.tradingpartners.ai/api/v1/alerts/statistics?to=2020-01-01T00:00:00Z&from=2020-01-02T00:00:00Z
Request Query Parameters
from - string fmt:date-time The start date in ISO 8601 format.
to - string fmt:date-time
The end date in ISO 8601 format.
ticker - string
Ticker concerned by the alert.
The filtering is case-insensitive & partial match.
instrument - string enum
Markets of the alert
The filtering is case-sensitive & complete match.
CRYPTOCURRENCIES
FOREX
INDICES
COMMODITIES
FUTURES
STOCKS
ETFS
status - string enum
Status of the alert
The filtering is case-sensitive & complete match.
ONMARK
ONGOING
WON
LOST
ABORTED
Statistics response object
Attributes
commodities - object
Statistics of commodities markets
aborted - number fmt:float64
Amount of invalidated commodities alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost commodities alerts.
total - number fmt:float64
Amount of commodities alerts.
won - number fmt:float64
Amount of won commodities alerts.
crypto - object
Statistics of cryptocurrencies markets
aborted - number fmt:float64
Amount of invalidated cryptocurrencies alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost cryptocurrencies alerts.
total - number fmt:float64
Amount of cryptocurrencies alerts.
won - number fmt:float64
Amount of won cryptocurrencies alerts.
forex - object
Statistics of forex markets
aborted - number fmt:float64
Amount of invalidated forex alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost forex alerts.
total - number fmt:float64
Amount of forex alerts.
won - number fmt:float64
Amount of won forex alerts.
futures - object
Statistics of futures markets
aborted - number fmt:float64
Amount of invalidated futures alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost futures alerts.
total - number fmt:float64
Amount of futures alerts.
won - number fmt:float64
Amount of won futures alerts.
indices - object
Statistics of indices markets
aborted - number fmt:float64
Amount of invalidated indices alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost indices alerts.
total - number fmt:float64
Amount of indices alerts.
won - number fmt:float64
Amount of won indices alerts.
stocks - object
Statistics of stocks markets
aborted - number fmt:float64
Amount of invalidated stocks alerts.
See the different alerts states for more information.
lost - number fmt:float64
Amount of lost stocks alerts.
total - number fmt:float64
Amount of stocks alerts.
won - number fmt:float64
Amount of won stocks alerts.
{
"commodities": {
"aborted": 0,
"lost": 1,
"total": 4,
"won": 3
},
"crypto": {
"aborted": 186,
"lost": 194,
"total": 582,
"won": 202
},
"forex": {
"aborted": 0,
"lost": 8,
"total": 34,
"won": 26
},
"futures": {
"aborted": 246,
"lost": 98,
"total": 498,
"won": 154
},
"indices": {
"aborted": 11,
"lost": 20,
"total": 54,
"won": 23
},
"stocks": {
"aborted": 0,
"lost": 36,
"total": 211,
"won": 175
}
}
Contact
If you encounter any problem or difficulties, you can contact the support by using the Contact Page.