REST Trading API Reference

Account

/accounts
GET1Returns a list of accounts belonging to the logged-in client.
/accounts/preferences
GET1Returns account preferences.
PUT1Updates account preferences.
/history/activity
GET3Returns the account activity history.
GET2Returns the account activity history.
/history/activity/{fromDate}/{toDate}
GET1Returns the account activity history for the given date range.
/history/activity/{lastPeriod}
GET1Returns the account activity history for the last specified period.
/history/transactions
GET2Returns the transaction history. By default returns the minute prices within the last 10 minutes.
/history/transactions/{transactionType}/{fromDate}/{toDate}
GET1Returns the transaction history for the specified transaction type and given date range.
/history/transactions/{transactionType}/{lastPeriod}
GET1Returns the transaction history for the specified transaction type and period.

Dealing

/confirms/{dealReference}
GET1Returns a deal confirmation for the given deal reference.
/positions
GET2Returns all open positions for the active account.
GET1Returns all open positions for the active account.
/positions/{dealId}
GET2Returns an open position for the active account by deal identifier.
GET1Returns an open position for the active account by deal identifier.
/positions/otc
DELETE1Closes one or more OTC positions
POST2Creates an OTC position.
POST1Creates an OTC position.
/positions/otc/{dealId}
PUT2Updates an OTC position.
PUT1Updates an OTC position.
/positions/sprintmarkets
GET2Returns all open sprint market positions for the active account.
GET1Returns all open sprint market positions for the active account.
POST1Creates a sprint market position.
/workingorders
GET2Returns all open working orders for the active account.
GET1Returns all open working orders for the active account.
/workingorders/otc
POST2Creates an OTC working order.
POST1Creates an OTC working order.
/workingorders/otc/{dealId}
DELETE2Deletes an OTC working order.
DELETE1Deletes an OTC working order.
PUT2Updates an OTC working order.
PUT1Updates an OTC working order.

Markets

/marketnavigation
GET1Returns all top-level nodes (market categories) in the market navigation hierarchy.
/marketnavigation/{nodeId}
GET1Returns all sub-nodes of the given node in the market navigation hierarchy.
/markets
GET2Returns the details of the given markets.
GET1Returns the details of the given markets.
/markets/{epic}
GET3Returns the details of the given market.
GET2Returns the details of the given market.
GET1Returns the details of the given market
/markets?searchTerm={searchTerm}
GET1Returns all markets matching the search term.
/prices/{epic}
GET3Returns historical prices for a particular instrument. By default returns the minute prices within the last 10 minutes.
/prices/{epic}/{resolution}/{numPoints}
GET2Returns a list of historical prices for the given epic, resolution and number of data points
GET1Returns a list of historical prices for the given epic, resolution and number of data points
/prices/{epic}/{resolution}/{startDate}/{endDate}
GET2Returns a list of historical prices for the given epic, resolution and date range.
/prices/{epic}/{resolution}?startdate={startdate}&enddate={enddate}
GET1Returns a list of historical prices for the given epic, resolution and date range.

Watchlists

/watchlists
GET1Returns all watchlists belonging to the active account.
POST1Creates a watchlist.
/watchlists/{watchlistId}
DELETE1Deletes a watchlist.
GET1Returns a watchlist.
PUT1Add a market to a watchlist.
/watchlists/{watchlistId}/{epic}
DELETE1Remove a market from a watchlist.

Client Sentiment

/clientsentiment
GET1Returns the client sentiment for the given instrument's market
/clientsentiment/{marketId}
GET1Returns the client sentiment for the given instrument's market
/clientsentiment/related/{marketId}
GET1Returns a list of related (what others have traded) client sentiment for the given instrument's market

Login

/session
DELETE1Log out of the current session
GET1Returns the user's session details and optionally tokens.
POST3Creates a trading session, obtaining session tokens for subsequent API access. Please note that region-specific login restrictions may apply.
POST2Creates a trading session, obtaining session tokens for subsequent API access. Please note that region-specific login restrictions may apply.
POST1Creates a trading session, obtaining session tokens for subsequent API access. Please note that region-specific login restrictions may apply.
PUT1Switches active accounts, optionally setting the default account
/session/encryptionKey
GET1Creates a trading session, obtaining session tokens for subsequent API access
/session/refresh-token
POST1Refreshes a trading session, obtaining new session tokens for subsequent API access.

General

/operations/application
GET1Returns a list of client-owned applications
PUT1Alters the details of a given user application
/operations/application/disable
PUT1Disables the current application key from processing further requests. Disabled keys may be reenabled via the My Account section on our web dealing platform.

Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[25006]: Read only sql transaction: 7 ERROR: cannot execute DELETE in a read-only transaction: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 156157695160cee2a8d9af84.19833499 ) in lock_release_all() (line 269 of /var/ig/webcontent/drupal/includes/lock.inc).