Tradeking currency options
4 stars based on
All responses come in standard JSON format. Request data is included within the body as JSON, with the exception of the SRV param which is passed along the query string for the authentication tradeking currency options security question requests.
The basic flow is centered around using our oAuth flow to create a userToken. Using this userToken you can authenticate the user to establish a 30 minute session. Successful authentication will return a session token that is required for all subsequent API calls. All tokens to expire after 30 days, at which point a renew token function will need to be called and the user re-authenticated.
We also provide a delete token function that should be implemented in the event the user wants tradeking currency options disconnect from your service.
Make sure to build and test your code against our testing environment before deploying to production. In order to test the flow without executing a trade, use our virtual Dummy Broker.
Click here to find out more about using the Dummy Broker. Desktop applications and non-standard mobile implementations need to use the TradeIt oAuth page and follow the outlined flow:. After 3 invalid login attempts in a row, the user IP tradeking currency options be blocked from TradeIt servers for a duration of 5 minutes.
TradeIt does not hold the trademark rights to the brokers it supports. Some brokers are more sensitive than others about protocols for branding and advertising. Therefore, we ask that you refrain from building broker-branded content into your UX, unless you have a specific arrangement with a broker for co-promotion that uses their branding.
If you see an error response stating broker is momentarily paused, and you are unsure, you can verify if the intended broker is available in your broker list. Once your app has recieved the oAuthVerifier token you'll want to pass it to your server to exchange it for the userId and userToken fields that are used with the authenticate method. The userId tradeking currency options userToken should be handled like a username and password.
The first time a user links an IB account, it needs to be activated, and it will be available in one or two business days. A specific message will be returned see activationTime field in a successful response. Each account needs only one activation per API Key. After using our oAuth page to create a userToken, you will then exchange this token for a session token to be used for all subsequent requests. You will also get a list of user accounts associated with that login information. The srv param is a timestamp or UID that must be the same between auth and answer security question requests for a user.
This should passed in along the query string. This result will always contain a security question. However, depending on the broker, it may also include a list of security question answer options. Standard error message format, short and long messages should be presented to the user.
Used when the auth response is a security question. Some brokers have tradeking currency options security questions, so it's possible to get a secondary security question response. Standard error messagemost often caused by the session having already expired.
Used to create a new userToken after expiration, this is similar to the original oAuth flowhowever tradeking currency options is preferred for renewing a token as it will keep tradeking currency options userId for better tracking and more accurate analytics. Retrieve account overview and balances. Please note some brokerages have slight variations for these fields see the broker exception table below. Retrieve all positions for an tradeking currency options given its number. Given parameters for an order, preview details and estimates of that order.
A successful result is required before being able to place the order. Please note that as not all brokers return all fields, your code should tradeking currency options able to handle null values. Standard error messageshort and long messages should be presented to the user so they can attempt to the fix the failed order and resubmit.
After a successful order preview request, this method is used to submit the order to the broker. Standard error messageshort and long messages should be shown to tradeking currency options user so they can correct the order and submit again. This method is used to place an Fx order.
FX does not have a review order step. Notice the v2 in the url path. Given an account number: The above command returns JSON structured like this:. Tradeking currency options an account number and order number, return the order status. Given an account number and order number, return the order status after cancelling. Given an account number all transactions, for the last 60 days are returned. TradeStation only provides the last 14 days order history.
Tradeking currency options actions tradeking currency options movement are not reported. IB provides only the last 6 days order history passed via the API. Fidelity does not currently support transaction history. This will be added in the near future.
Retrieve the up-to-date list of available brokers enabled for the specified API key. This is the list of brokers available for users to link to your app. In order to provide a smooth and efficient user experience, your app should take in to account the trading instruments and services that are available for a given linked broker or account.
The list of capabilities for each broker is returned by the getBrokerList endpoint. Each account associated with a linked broker has different trading capabilites. When the authenticate request is made for a linked broker, the response contains a list of the user's accounts associated with that linked broker. Each account in the response will contain a list of order capabilities specific to that account.
Order capabilities must be used to display the list of actions, price types, expiration types available to the user in the trading ticket.
All requests can potentially return our standard error message. We provide a table of error codes and meanings below. For the few methods that specify so, we also return a short and tradeking currency options message that should be presented to the user.
Generally, the short message can be used as title and the long messages as the body. TradeIt Testing Environment is tradeking currency options In order to tradeking currency options the flow without executing a trade, use the Dummy Broker. Depending on the username you choose password will always be "pass"you can emulate the following scenarios:.
When username is dummydummyMultiple or dummySecurity:. Stockflare helps you find new trade ideas with a five star stock rating system. Menu Table of contents. Desktop applications and non-standard mobile implementations need to use the TradeIt oAuth page and follow the outlined flow: Broker Branding TradeIt does not hold the trademark rights to the brokers it supports.
Please check back soon. Check back soon up to two business days "] userId String userId used in authentication userToken string userToken used in authentication activationTime string linked account availability: It provides the instruments and related actions, expiration types, price types that the account supports. Error Response Standard error message format, short tradeking currency options long messages should be presented to the user.
Close Session curl "https: Keep Alive curl "https: Balance Service Get Account Overview. The shortName of the broker being linked. Array of Order capability objects. Possible values for value property corresponds to the orderAction post parameter. Possible values for value property corresponds to the orderPriceType post parameter. Possible values for value property corresponds to the orderExpiration tradeking currency options parameter.
If null this field must not be displayed to the user. If null last price must be fetched from a quote provider. Preferred stocks are presented with. Pexcept for Ally Invest and Tradier. Fidelity holds the user's cash in money market funds and also returns those funds as position holdings, we classify these holdings as CASH.
See example on the side. Check the account order capabilities to determine what are the possible actions. For Class A or B shares use dot annotation i. Check the account order capabilities to determine what are the possible price types.