Documentation API Capital.com 1.0.0
Documentation API Capital.com 1.0.0
0)
L'API [Link] permet un accès direct à la dernière version de notre moteur de trading.
Informations générales
Pour commencer
Pour utiliser l'API, les étapes simples suivantes doivent être suivies :
Données du marché
Recevez des prix en temps réel pour toute la gamme d'actifs disponibles avec l'API
REST et WebSocket.
Obtenez l'historique des prix pour toute la gamme des actifs.
Fonctionnalité de trading
Exemples et collections
Changelog
28 novembre 2023
La limite de 1 demande par seconde est définie pour le point de terminaison POST
/session .
4 août 2023
Ajout d'une possibilité de consulter la liste complète des marchés disponibles à l'aide
du point de terminaison GET /markets
04 juillet 2023
Set maximum date range for parameters from , to , lastPeriod to 1 day for the
GET /history/activity
23 mars 2022
Limit of 1000 requests per hour is set for the POST /positions and POST
/workingorders in Demo.
16 mars 2022
10 février 2022
Authentification
Utilisation de votre clé API, des détails de connexion et de votre mot de passe.
:
Utilisation de votre clé API, de vos informations de connexion et de votre mot de passe
crypté.
Utilisation de votre clé API, des détails de connexion et de votre mot de passe
Here you should simply use the POST /session endpoint and mention the received in the
platform’s Settings API key in the X-CAP-API-KEY header, login and API key password info
in the identifier and password parameters. The value of the encryptedPassword
parameter should be false .
Utilisation de votre clé API, de vos détails de connexion et de votre mot de passe crypté
First of all you should use the GET /session/encryptionKey and mention the
generated in the platform’s Settings API key in the X-CAP-API-KEY header. As a
response you will receive the encryptionKey and timeStamp parameters;
Using the received encryptionKey and timeStamp parameters you should encrypt
your API key password using the AES encryption method.
encryptionKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1dOujgcFh/9n4JLJMY4VMW
timestamp = 1647440528194;
password = "1111qqqq";
// Result of password encryption with the encryptionKey
:
encryptedPassword = "hUxWlqKRhH6thdjJnR7DvdlGE7ABkcKHrzKDGeE7kQ7nKg91sw7BpYsLDqtxih
Go to the POST /session endpoint, set true value for the encryptedPassword
parameter and mention the received in the platform’s Settings API key in the X-CAP-
API-KEY header, login and prior encrypted API key password info in the identifier
and password parameters
On starting the session you will receive the CST and X-SECURITY-TOKEN parameters in
the response headers. CST is an authorization token, X-SECURITY-TOKEN shows which
financial account is used for the trades. These headers should be passed on subsequent
requests to the API. Both tokens are valid for 10 minutes after the last use.
Symbologie
Comptes financiers
accountId est l'ID de votre compte financier. Chaque compte financier a son identifiant
unique. Pour afficher la liste complète des comptes financiers disponibles, utilisez le
point de terminaison GET /accounts . Pour savoir quel compte financier est utilisé
pour les opérations de négociation dans l'API, veuillez vous rendre sur le point de
terminaison GET /session . Pour modifier le compte financier, utilisez : PUT
/session .
Épique
Epic is the name of the market pair. You can use the GET /markets{?searchTerm}
endpoint to find the market pairs you are interested in. A simple market name like
‘Bitcoin’ or ‘BTC’ can be requested with the searchTerm parameter and you will
receive the full list of the market pairs associated with it. The GET
/marketnavigation endpoint can be used to obtain asset group names. These
names can be used with the GET /marketnavigation/{nodeId} endpoint to view
the list of assets under the corresponding group.
Listes de surveillance
The Watchlist is the list of assets which can be seen and created on the platform. The
:
GET /watchlists endpoint returns the existing watchlists on your account. Each
watchlist has an id parameter which can be used to obtain the corresponding list of
assets: GET /watchlists/{watchlistId}
Commandes et positions
faq
Sur [Link], nous suggérons à la fois REST et WebSocket API. Dans le cas des mises à
:
jour des prix en temps réel de l'API WebSocket pour un maximum de 40 instruments à la
fois.
Oui, nous avons plusieurs limitations dans notre API [Link]. Voici la liste :
Vous avez un maximum de 100 tentatives par 24 heures pour générer avec succès des
clés API.
Le taux de demande maximal est de 10 par seconde et par utilisateur.
Le taux de demande maximal est de 1 par 0,1 seconde par utilisateur lors de l'ouverture
de positions ou de la création de commandes. Sinon, les demandes de
position/commande seront rejetées.
La durée de la session WebSocket est de 10 minutes. Afin de maintenir la session en
direct, utilisez le point de terminaison ping.
La session REST est également active pendant 10 minutes. Dans le cas où votre
inactivité est plus longue que cette période, une erreur se produira lors de la prochaine
demande.
POST /session la limite de point de terminaison est de 1 demande par seconde par
clé API.
POST /positions and POST /workingorders endpoint limit is 1000 requests per
hour in the Demo account.
POST /accounts/topUp limites de points de terminaison : 10 demandes par seconde
et 100 demandes par compte et par jour.
Le solde du compte de démonstration ne peut pas dépasser 100000.
L'API WebSocket permet l'abonnement à un maximum de 40 instruments.
Le streaming WebSocket tombe en arrêt lorsque le compte financier est modifié à l'aide
du point de terminaison PUT /session .
Oui, l'API [Link] prend en charge tous les instruments que vous pouvez trouver sur la
plate-forme.
:
Comment commencer à utiliser l'API [Link]
?
In order to start using our [Link] API you should first of all generate an API key in the
Settings > API integrations section on the platform. Upon doing so you will be able
to use this key and your account credentials to authorise for the API usage with the POST
/session method.
Bien sûr. Afin d'utiliser votre compte de démonstration avec notre API, vous devez
mentionner le service suivant comme URL de base : [Link]
[Link]/
In order to generate an API Key you should log in to your account, go to the Settings >
API integrations section and click on the Generate API key button.
Dans le cas où votre 2FA serait désactivé, il vous sera demandé d'allumer cette fonction
pour assurer une utilisation sûre et sécurisée des clés.
Next you will be presented with the Generate new key window where you will be able to
name your API Key, add an API key password and set an expiration date (if needed). By
default the validity of the API key is 1 year.
Après cela, vous devez entrer votre code 2FA et attendre qu'une clé API soit générée. Une
fois qu'une clé API est générée, vous verrez une clé API elle-même. S'il vous plaît, assurez-
vous d'enregistrer ces données car elles ne sont affichées qu'une seule fois.
Félicitations. Vous auriez dû réussir à intégrer notre fonctionnalité API. Si vous avez des
:
questions, n'hésitez pas à nous contacter (support@[Link]). Nous serons heureux de
vous aider.
Actuellement, nous n'avons qu'un seul type de privilèges de clés API qui permet le trading.
Aucune clé d'API en lecture seule ne peut être générée.
A Custom password field allows you to generate a separate password for your API key.
You should use this Custom password for the API key in order to start the session.
In order to pause or launch an API key you can click on the Pause or Play icons next to
the API key in the Settings > API integrations section. This functionality allows you
to either disable or enable a key when you need to do it without deleting a key itself and re-
generating a new one.
In order to view more information about the API key you have generated please click on an
Eye icon next to the key in the Settings > API integrations section.
:
Je ne vois pas ma clé API. Que pourrait-il se
passer ?
Dans tous les autres cas, vos clés API devraient fonctionner comme prévu.
Selon la procédure existante, le seul moment où vous pouvez voir votre clé API est lors de sa
création. Après cela, il sera toujours masqué.
Si vous avez perdu votre clé API ou si vous ne l'avez pas enregistrée, vous devrez en créer
une nouvelle et vous assurer de stocker une nouvelle clé dans un endroit sécurisé.
API WebSocket
Afin de maintenir la connexion en vie, le service de ping au moins une fois toutes les 10
minutes.
Plus d'informations sur les paramètres des demandes et des réponses de l'API WebSocket
peuvent être trouvées dans le tableau ci-dessous :
:
Paramètre description
Destination : [Link]
{
"destination": "[Link]",
"correlationId": "1",
"cst": "zvkT26****nsHKk",
"securityToken": "g6K90****QKvCS7",
"payload": {
"epics": [
"OIL_CRUDE"
]
}
}
:
Exemple de message de réponse sur l'abonnement réussi :
{
"status": "OK",
"destination": "[Link]",
"correlationId": "1",
"payload": {
"subscriptions": {
"OIL_CRUDE": "PROCESSED"
}
}
}
Exemple du message de réponse avec les mises à jour des données de marché :
{
"status": "OK",
"destination": "quote",
"payload": {
"epic": "OIL_CRUDE",
"product": "CFD",
"bid": 93.87,
"bidQty": 4976.0,
"ofr": 93.9,
"ofrQty": 5000.0,
"timestamp": 1660297190627
}
}
Destination : [Link]
{
"status": "OK",
"destination": "[Link]",
"correlationId": "2",
"payload": {
"subscriptions": {
"OIL_CRUDE": "PROCESSED"
}
}
}
Destination : [Link]
Abonnez-vous aux mises à jour des barres de chandeliers en mentionnant les épopées, les
résolutions et le type de barre
Obligatoire
Paramètre Format description
?
Remarques :
résolutions chaîne[] NON - Valeur par défaut : MINUTE
- Possible values: MINUTE , MINUTE_5 ,
MINUTE_15 , MINUTE_30 , HOUR ,
HOUR_4 , DAY , WEEK
Type de chandeliers
Remarques :
type chaîne NON
- Valeur par défaut : classic
- Valeurs possibles : classic , heikin-
ashi
{
"destination": "[Link]",
"correlationId": "3",
"cst": "zvkT26****nsHKk",
"securityToken": "g6K90****QKvCS7",
"payload": {
"epics": [
"OIL_CRUDE",
"AAPL"
],
"resolutions": [
"MINUTE_5"
],
"type": "classic"
}
}
Exemple du message de réponse avec les mises à jour des données de marché :
{
"status": "OK",
"destination": "[Link]",
"payload": {
"resolution": "MINUTE_5",
"epic": "AAPL",
"type": "classic",
"priceType": "bid",
"t": 1671714000000,
"h": 134.95,
"l": 134.85,
"o": 134.86,
"c": 134.88
}
}
Destination : [Link]
Se désabonner des mises à jour des barres de chandeliers pour des épopées, des
résolutions et des types de barres spécifiques.
:
Le principe général est le suivant : vous vous désabonnez du paramètre que vous
mentionnez dans la demande. Dans le cas où vous mentionnez épique, vous vous
désabonnez de tous les types de barres et résolutions correspondants.
Obligatoire
Paramètre Format description
?
Remarques :
- Valeur par défaut : Toutes les valeurs
résolutions chaîne[] NON
possibles
- Possible values: MINUTE , MINUTE_5 ,
MINUTE_15 , MINUTE_30 , HOUR ,
HOUR_4 , DAY , WEEK
Remarques :
Types chaîne[] NON - Valeur par défaut : toutes les valeurs
possibles
- Valeurs possibles : classic , heikin-
ashi
// Unsubscribe from candlestick bars updates of OIL_CRUDE epic with MINUTE and MINU
{
"destination": "[Link]",
"correlationId": "4",
"cst": "zvkT26****nsHKk",
"securityToken": "g6K90****QKvCS7",
"payload": {
"epics": [
"OIL_CRUDE"
],
"resolutions": [
:
"MINUTE",
"MINUTE_5"
],
"types": [
"heikin-ashi"
]
}
}
{
"status": "OK",
"destination": "[Link]",
"correlationId": "4",
"payload": {
"subscriptions": {
"OIL_CRUDE:MINUTE_5:heikin-ashi": "PROCESSED",
"OIL_CRUDE:MINUTE:heikin-ashi": "PROCESSED"
}
}
}
Ping le service
Destination : ping
{
"destination": "ping",
"correlationId": "5",
"cst": "zvkT26****nsHKk",
"securityToken": "g6K90****QKvCS7"
}
:
Exemple de message de réponse :
{
"status": "OK",
"destination": "ping",
"correlationId": "5",
"payload": {}
}
API REST
Retrouvez ci-dessous la liste de tous les points de terminaison de l'API REST disponibles
général
Réponses
200 OK
OBTENIR /api/v1/heure
:
Demander des échantillons
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/time", [Link]) ;
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200
Type de contenu
application/json
copie
{
"serverTime": 1649259764171
}
Ping le service
Ping le service pour maintenir une session de trading en vie
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
OBTENIR /api/v1/ping
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/ping", [Link])
;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
:
Échantillons de réponse
200
Type de contenu
application/json
copie
{
"status": "OK"
}
Session
Clé de chiffrement
Obtenez la clé de cryptage à utiliser afin d'envoyer le mot de passe de la clé API sous une
forme cryptée
PARAMÈTRES DE L'EN-TÊTE
Réponses
200 OK
:
OBTENIR /api/v1/session/encryptionKey
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/session/encryptionKey",
[Link]) ;[Link]("X-CAP-API-KEY",
"ENTER_GENERATED_API_KEY");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200
Type de contenu
application/json
copie
{
"encryptionKey":
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxOZgr4OMjNBMKpR+fZpxrDGGwDk3eGnrI+
"timeStamp": 1649058606014
}
Détails de la session
:
Détails de la session
Renvoie les détails de la session de l'utilisateur
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
OBTENIR /api/v1/session
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/session", [Link])
;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
:
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200
Type de contenu
application/json
copie
{
"clientId": "12345678",
"accountId": "12345678901234567",
"timezoneOffset": 3,
"locale": "en",
"currency": "USD",
"streamEndpoint": "[Link]
[Link]/"
}
La session est active pendant 10 minutes. Dans le cas où votre inactivité est plus longue
que cette période, vous devez créer une nouvelle session
Obligatoire
Paramètre Format description
?
PARAMÈTRES DE L'EN-TÊTE
objet
Réponses
200 OK
PUBLICATION /api/v1/session
PHP Python
:
Type de contenu
application/json
copie
{
"identifier": "ENTER_YOUR_EMAIL",
"password": "ENTER_YOUR_PASSWORD"
}
Échantillons de réponse
Type de contenu
texte/simple
Exemple
Succès : Création de la session (mot de passe de base)
copie
{
"type de compte" : "CFD",
"accountInfo" : {
"équilibre" : 92,89,
« dépôt » : 90,38,
"Profitloss" : 2,51,
"disponible" : 64,66
},
"currencyIsoCode" : "USD",
"monnaieSymbole" : "$",
"currentAccountId" : "12345678901234567",
"streamingHost" : "[Link]
[Link]/",
"comptes" : [
{
"accountId" : "12345678901234567",
"nom du compte" : "USD",
"préféré" : vrai,
"type de compte" : "CFD",
"monnaie" : "USD",
"symbole" : "$",
:
"équilibre" : {
"équilibre" : 92,89,
« dépôt » : 90,38,
"Profitloss" : 2,51,
"disponible" : 64,66
}
},
{
"accountId" : "12345678907654321",
"nom du compte" : "EUR",
"préféré" : faux,
"type de compte" : "CFD",
"monnaie" : "EUR",
"symbole" : "€",
"équilibre" : {
"équilibre" : 0,0,
"dépôt" : 0,0,
"profitloss" : 0,0,
"disponible" : 0,0
}
}
],
"clientId" : "12345678",
"timezoneOffset" : 3,
"hasActiveDemoAccounts" : vrai,
"hasActiveLiveAccounts" : vrai,
"trailingStopsEnabled" : faux
}
Obligatoire
Paramètre Format description
?
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
objet
Réponses
200 OK
METTRE /api/v1/session
PHP Python
Type de contenu
application/json
copie
:
copie
{
"accountId": "{{accountId}}"
}
Échantillons de réponse
200 400
Type de contenu
application/json
copie
{
"trailingStopsEnabled": false,
"dealingEnabled": true,
"hasActiveDemoAccounts": false,
"hasActiveLiveAccounts": true
}
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
:
200 OK
SUPPRIMER /api/v1/session
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/session", [Link])
;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200
Type de contenu
texte/simple
copie
{
"statut" : "SUCCÈS"
}
:
Comptes
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
OBTENIR /api/v1/comptes
Python
:
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/accounts", [Link])
;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200
Type de contenu
application/json
Préférences du compte
Renvoie les préférences du compte, c'est-à-dire les paramètres d'effet de levier et le mode
de négociation
PARAMÈTRES DE L'EN-TÊTE
:
JETON DE SÉCURITÉ X chaîne
Exemple : ENTER_OBTAINED_SECURITY_TOKEN
Jeton de compte identifiant le compte courant du client
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
OBTENIR /api/v1/comptes/préférences
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/accounts/preferences",
[Link]) ;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
:
Échantillons de réponse
200
Type de contenu
application/json
Obligatoire
Paramètre Format description
?
PARAMÈTRES DE L'EN-TÊTE
objet
Réponses
200 OK
METTRE /api/v1/comptes/préférences
PHP Python
Type de contenu
application/json
Échantillons de réponse
200 400
Type de contenu
application/json
copie
{
"status": "SUCCESS"
}
The maximum possible date range between from and to parameters is 1 day. If only one
of the parameters is specified ( from or to ), the 1-day date range will be selected by
default
Paramètre ENUM
PARAMÈTRES DE LA REQUÊTE
:
de chaîne
Exemple : from=2022-01-17T[Link]
Date de début. Format de la date : AAAA-MM-DDTHH:MM:SS (par
ex. 2022-04-01T[Link]). Filtration par date basée sur le
paramètre dateUTC
à chaîne
Exemple : to=2022-01-17T[Link]
Date de fin. Format de la date : AAAA-MM-DDTHH:MM:SS (par ex.
2022-04-01T[Link]). Filtration par date basée sur le paramètre
dateUTC
détaillé booléen
Exemple : detailed=true
Indique s'il faut récupérer des détails supplémentaires sur l'activité.
Faux par défaut
dealId chaîne
Exemple : dealId={{dealId}}
Obtenir des informations sur l'activité pour un dealId spécifique
filtre chaîne
Exemple : filtre = source ! =DÉFÉRANT ;type !
=POSITION;status==REJETÉ;épique==HUILE_CRUDE,OR
Filtrer la liste d'activités à l'aide de FIQL. Liste des paramètres pris
en charge : épique, source, statut, type
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
:
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
OBTENIR /api/v1/histoire/activité
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/history/activity? from=2022-
01-17T[Link]&to=2022-01-
17T[Link]&lastPeriod=600&detailed=true&dealId=
{{dealId}}&filter=source! =DÉFÉRANT ;type !
=POSITION;status==REJECTED;epic==OIL_CRUDE,GOLD",
[Link]);[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
:
Échantillons de réponse
200 400
Type de contenu
application/json
Exemple
Succès : Filtrer la liste par date
- "activities": [
+ { … },
+ { … },
+ { … }
]
}
PARAMÈTRES DE LA REQUÊTE
de chaîne
Exemple : from=2021-08-10T[Link]
Date de début. Format de la date : AAAA-MM-DDTHH:MM:SS (par
ex. 2022-04-01T[Link]). Filtration par date basée sur le
paramètre dateUTC
à chaîne
Exemple : to=2021-09-10T[Link]
Date de fin. Format de la date : AAAA-MM-DDTHH:MM:SS (par ex.
:
2022-04-01T[Link]). Filtration par date basée sur le paramètre
dateUTC
type chaîne
Exemple : type=DÉPÔT
Type de transaction. Valeurs possibles : INACTIVITY_FEE,
RESERVE, VOID, UNRESERVE, WRITE_OFF_OR_CREDIT,
CREDIT_FACILITY, FX_COMMISSION, COMPLAINT_SETTLEMENT,
DEPOSIT, RETIRAWAL, REFUND, WITHDRAWAL_MONEY_BACK,
TRADE, SWAP, TRADE_COMMISSION, TRADE_COMMISSION_GSL,
NEGATIVE_BALANCE_PROTECTION, TRADE_CORRECTION,
CHARGEBACK, ADJUSTMENT, BONUS, TRANSFER,
CORPORATE_ACTION, CONVERSION, REBATE,
TRADE_SLIPPAGE_PROTECTION
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
:
OBTENIR /api/v1/historique/transactions
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/history/transactions?
from=2021-08-10T[Link]&to=2021-09-
10T[Link]&lastPeriod=600&type=DEPOSIT", [Link])
;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200
Type de contenu
application/json
Exemple
Succès : Obtenir la liste des transactions au cours de la dernière heure
Limites :
Obligatoire
Paramètre Format description
?
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
objet
:
Réponses
200 OK
PUBLICATION /api/v1/accounts/topUp
PHP Python
Type de contenu
application/json
copie
{
"amount": 1000
}
Échantillons de réponse
200 400
Type de contenu
application/json
copie
{
"successful": true
}
:
Négociations
Confirmation de position/commande
Renvoie une confirmation d'accord pour la référence d'accord donnée
PARAMÈTRES DE CHEMIN
dealRéférence chaîne
Obligatoire
Exemple : {{dealReference}}
Référence de transaction pour une transaction non confirmée
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
404 introuvable
:
OBTENIR /api/v1/confirms/{dealReference}
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/confirms/{{dealReference}}",
[Link]) ;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200 404
Type de contenu
application/json
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
:
OBTENIR /api/v1/positions
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/positions", [Link])
;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200
Type de contenu
application/json
Veuillez noter que lors de la création de la position, un ordre est créé en premier avec le
préfixe 'o_' dans le paramètre dealReference
Obligatoire
Paramètre Format description
?
Direction de l'accord
direction chaîne OUI
Must be BUY or SELL
Remarques :
- Valeur par défaut : false
- If guaranteedStop equals true ,
GarantieStop booléen NON
then set stopLevel , stopDistance
or stopAmount
- Cannot be set if trailingStop is
true
- Cannot be set if hedgingMode is
true
Remarques :
trailingStop booléen NON - Valeur par défaut : false
- If trailingStop equals true , then
set stopDistance
- Cannot be set if guaranteedStop is
true
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
objet
Réponses
200 OK
PHP Python
Type de contenu
application/json
copie
{
"epic": "SILVER",
"direction": "BUY",
"size": 1,
"guaranteedStop": true,
"stopLevel": 20,
"profitLevel": 27
}
Échantillons de réponse
200 400
Type de contenu
application/json
Exemple
Succès : Créer une position simple
copie
{
"dealReference": "o_98c0de50-9cd5-4481-8d81-890c525eeb49"
}
:
Position unique
Renvoie une position ouverte pour le compte actif par identifiant de transaction
PARAMÈTRES DE CHEMIN
dealId chaîne
Obligatoire
Exemple : {{dealId}}
Référence permanente pour un échange confirmé
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
404 introuvable
OBTENIR /api/v1/positions/{dealId}
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/positions/{{dealId}}",
[Link]) ;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
Échantillons de réponse
200 404
Type de contenu
application/json
Remarques :
- Valeur par défaut : false
- If guaranteedStop equals true ,
GarantieStop booléen NON
then set stopLevel , stopDistance
or stopAmount
- Cannot be set if trailingStop is
true
- Cannot be set if hedgingMode is
true
Remarques :
trailingStop booléen NON - Valeur par défaut : false
- If trailingStop equals true , then
set stopDistance
- Cannot be set if guaranteedStop is
true
profit déclenché
PARAMÈTRES DE CHEMIN
dealId chaîne
Obligatoire
Exemple : {{dealId}}
Référence permanente pour un échange confirmé
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
objet
Réponses
200 OK
404 introuvable
METTRE /api/v1/positions/{dealId}
PHP Python
Type de contenu
application/json
copie
{
"guaranteedStop": true,
"stopDistance": 3,
"profitAmount": 2
}
Échantillons de réponse
Type de contenu
application/json
copie
{
"dealReference": "p_006011e7-0001-54c4-0000-000080560068"
}
Position rapprochée
Fermer la position
PARAMÈTRES DE CHEMIN
dealId chaîne
Obligatoire
Exemple : {{dealId}}
Référence permanente pour un échange confirmé
:
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
Réponses
200 OK
404 introuvable
SUPPRIMER /api/v1/positions/{dealId}
Python
copie
var options = new RestClientOptions("[Link]
[Link]")
{MaxTimeout = -1,
};
var client = nouveau RestClient(options) ;
var request = new RestRequest("/api/v1/positions/{{dealId}}",
[Link]) ;[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");[Link]("CST",
"ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request)
;[Link]([Link]) ;
:
;[Link]([Link]) ;
Échantillons de réponse
200 404
Type de contenu
application/json
copie
{
"dealReference": "p_006011e7-0001-54c4-0000-000080560068"
}
PARAMÈTRES DE L'EN-TÊTE
CST chaîne
Exemple: ENTER_OBTAINED_CST_TOKEN
Jeton d'accès identifiant le client
:
Réponses
200 OK
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/workingorders", [Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200
Content type
application/json
Order direction
direction string YES
Must be BUY or SELL
Order type
type string YES
Must be LIMIT or STOP
goodTillDate string NO
Date format: YYYY-MM-DDTHH:MM:SS
(e.g. 2022-06-09T[Link] )
Notes:
- Default value: false
- If guaranteedStop equals true ,
guaranteedStop boolean NO
then set stopLevel , stopDistance
or stopAmount
- Cannot be set if trailingStop is
true
:
true
- Cannot be set if hedgingMode is
true
Notes:
trailingStop boolean NO - Default value: false
- If trailingStop equals true , then
set stopDistance
- Cannot be set if guaranteedStop is
true
stopDistance number NO
Notes:
- Required parameter if trailingStop
is true
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
:
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
object
Responses
200 OK
POST /api/v1/workingorders
Request samples
PHP Python
Content type
application/json
Copy
{
"epic": "SILVER",
"direction": "BUY",
"size": 1,
"level": 20,
"type": "LIMIT"
}
Response samples
:
200 400
Content type
application/json
Example
Success: Create limit order
Copy
{
"dealReference": "o_307bb379-6dd8-4ea7-8935-faf725f0e0a3"
}
goodTillDate string NO
Date format: YYYY-MM-DDTHH:MM:SS
(e.g. 2022-06-09T[Link] )
Notes:
- Default value: false
- If guaranteedStop equals true ,
guaranteedStop boolean NO
then set stopLevel , stopDistance
or stopAmount
- Cannot be set if trailingStop is
true
:
- Cannot be set if hedgingMode is
true
Notes:
trailingStop boolean NO - Default value: false
- If trailingStop equals true , then
set stopDistance
- Cannot be set if guaranteedStop is
true
stopDistance number NO
Notes:
PATH PARAMETERS
dealId string
required
Example: {{dealId}}
Permanent deal reference for an order
HEADER PARAMETERS
:
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
object
Responses
200 OK
PUT /api/v1/workingorders/{dealId}
Request samples
PHP Python
Content type
application/json
Copy
{
"goodTillDate": "2022-06-09T[Link]",
"guaranteedStop": true,
"stopDistance": 4,
"profitDistance": 4
}
:
Response samples
200 404
Content type
application/json
Copy
{
"dealReference": "o_56e73aad-45fe-4058-a05b-569b1a6e8ba0"
}
PATH PARAMETERS
dealId string
required
Example: {{dealId}}
Permanent deal reference for an order
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
:
200 OK
DELETE /api/v1/workingorders/{dealId}
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/workingorders/{{dealId}}",
[Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 404
Content type
application/json
Copy
{
"dealReference": "o_38323f0c-241a-43b3-8edf-a75d2ae989a5"
:
"dealReference": "o_38323f0c-241a-43b3-8edf-a75d2ae989a5"
}
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
GET /api/v1/marketnavigation
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/marketnavigation",
[Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200
Content type
application/json
PATH PARAMETERS
nodeId string
required
Example: {{nodeId}}
Identifier of the node to browse
QUERY PARAMETERS
limit integer
Example: limit=500
The maximum number of the markets in answer. Default = 500
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
GET /api/v1/marketnavigation/{nodeId}
Request samples
:
C# cURL HTTP Java JavaScript NodeJS PHP
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/marketnavigation/{{nodeId}}?
limit=500", [Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 400
Content type
application/json
Example
Success: List of category sub-nodes
- "nodes": [
+ { … },
+ { … },
+ { … },
+ { … },
+ { … },
+ { … },
+ { … }
:
+ { … }
]
}
Markets details
Returns the details of all or specific markets
If query parameters are not specified in the request, the list of all available markets will be
returned
QUERY PARAMETERS
searchTerm string
Example: searchTerm=silver
The term to be used in the search. Has higher priority, than 'epics'
parameter meaning that in case both searchTerm and epic are
mentioned only searchTerm is taken into consideration.
epics string
Example: epics=SILVER,NATURALGAS
The epics of the market, separated by a comma. Max number of
epics is limited to 50
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
:
Responses
200 OK
GET /api/v1/markets
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/markets?
searchTerm=silver&epics=SILVER,NATURALGAS", [Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 400
Content type
application/json
Example
:
Example
Successful response: searchTerm
PATH PARAMETERS
epic string
required
Example: {{epic}}
The epic of the market
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/markets/{{epic}}",
[Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 404
Content type
application/json
- "snapshot": {
"marketStatus": "TRADEABLE",
"netChange": -0.627,
"percentageChange": -0.27,
"updateTime": "2022-04-06T[Link].955",
"delayTime": 0,
:
"delayTime": 0,
"bid": 22.041,
"offer": 22.061,
"high": 22.098,
"low": 21.926,
"decimalPlacesFactor": 3,
"scalingFactor": 1,
+ "marketModes": [ … ]
}
}
Historical prices
Returns historical prices for a particular instrument
PATH PARAMETERS
epic string
required
Example: {{epic}}
Instrument epic
QUERY PARAMETERS
resolution string
Example: resolution=MINUTE
Defines the resolution of requested prices. Possible values are
MINUTE, MINUTE_5, MINUTE_15, MINUTE_30, HOUR, HOUR_4, DAY,
WEEK
:
max integer
Example: max=10
The maximum number of the values in answer. Default = 10, max =
1000
from string
Example: from=2022-02-24T[Link]
Start date. Date format: YYYY-MM-DDTHH:MM:SS (e.g. 2022-04-
01T[Link]). Filtration by date based on snapshotTimeUTC
parameter
to string
Example: to=2022-02-24T[Link]
End date. Date format: YYYY-MM-DDTHH:MM:SS (e.g. 2022-04-
01T[Link]). Filtration by date based on snapshotTimeUTC
parameter
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
GET /api/v1/prices/{epic}
:
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/prices/{{epic}}?
resolution=MINUTE&max=10&from=2022-02-24T[Link]&to=2022-02-
24T[Link]", [Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 400
Content type
application/json
Example
Success: Default response
QUERY PARAMETERS
marketIds string
Example: marketIds=SILVER,NATURALGAS
Comma separated list of market identifiers
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
:
Responses
200 OK
GET /api/v1/clientsentiment
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/clientsentiment?
marketIds=SILVER,NATURALGAS", [Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 404
Content type
application/json
:
Copy Expand all Collapse all
{
- "clientSentiments": [
+ { … },
+ { … }
]
}
PATH PARAMETERS
marketId string
required
Example: {{marketId}}
Market identifier
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new
RestRequest("/api/v1/clientsentiment/{{marketId}}", [Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 404
Content type
application/json
Copy
{
"marketId": "SILVER",
"longPositionPercentage": 91.85,
"shortPositionPercentage": 8.15
}
:
Watchlists
All watchlists
Returns all watchlists belonging to the current user
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
GET /api/v1/watchlists
Request samples
Python
:
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/watchlists", [Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200
Content type
application/json
Create watchlist
Create a watchlist
Watchlist name
:
Watchlist name
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
object
Responses
200 OK
POST /api/v1/watchlists
Request samples
PHP Python
Content type
:
Content type
application/json
Response samples
200 400
Content type
application/json
Example
Success: Watchlist created
Copy
{
"watchlistId": "123458",
"status": "SUCCESS"
}
Single watchlist
Returns a watchlist for the given watchlist identifier
PATH PARAMETERS
watchlistId string
required
Example: {{watchlistId}}
Identifier of the watchlist
:
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
GET /api/v1/watchlists/{watchlistId}
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/watchlists/{{watchlistId}}",
[Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
:
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 404
Content type
application/json
PATH PARAMETERS
watchlistId string
required
Example: {{watchlistId}}
Identifier of the watchlist
HEADER PARAMETERS
:
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
object
Responses
200 OK
PUT /api/v1/watchlists/{watchlistId}
Request samples
PHP Python
Content type
application/json
Copy
{
"epic": "SILVER"
}
Response samples
:
200 404
Content type
application/json
Copy
{
"status": "SUCCESS"
}
Delete watchlist
Delete the watchlist
PATH PARAMETERS
watchlistId string
required
Example: {{watchlistId}}
Identifier of the watchlist
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/watchlists/{{watchlistId}}",
[Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 404
Content type
application/json
Copy
{
"status": "SUCCESS"
}
:
Remove market from watchlist
Remove a market from the watchlist
PATH PARAMETERS
watchlistId string
required
Example: {{watchlistId}}
Identifier of the watchlist
epic string
required
Example: {{epic}}
Instrument epic identifier
HEADER PARAMETERS
X-SECURITY-TOKEN string
Example: ENTER_OBTAINED_SECURITY_TOKEN
Account token identifying the client's current account
CST string
Example: ENTER_OBTAINED_CST_TOKEN
Access token identifying the client
Responses
200 OK
DELETE /api/v1/watchlists/{watchlistId}/{epic}
:
Request samples
Python
Copy
var options = new RestClientOptions("[Link]
[Link]")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new
RestRequest("/api/v1/watchlists/{{watchlistId}}/{{epic}}",
[Link]);
[Link]("X-SECURITY-TOKEN",
"ENTER_OBTAINED_SECURITY_TOKEN");
[Link]("CST", "ENTER_OBTAINED_CST_TOKEN");
RestResponse response = await [Link](request);
[Link]([Link]);
Response samples
200 404
Content type
application/json
Copy
{
"status": "SUCCESS"
}
: