Go to top ↑
Menu
OVERVIEW JSON API iOS SDK Android SDK

Usage

Configure the SDK

This must occur before using any functionality of the SDK. If it is not called first, subsequent calls will cause the app to terminate!

TradeItSDK.configure(
    apiKey: API_KEY, // obtained by registering for the Develoer Portal at: http://developers.trade.it/
    oAuthCallbackUrl: URL(string: "yourAppScheme://completeOAuth")!, // Use the existing deep link scheme for your app or register a new one
    environment: TradeItEmsTestEnv
)

Using the SDK

There are two ways to use the TradeIt SDK:

  • The SDK includes pre-built screens and UI workflows that minimize the effort to integrate TradeIt trading, portfolio, and account management into an app. See Launching TradeIt screens.
  • The SDK also includes a set of classes that allow developers to build custom screens and UI workflows for “deep integration” with the TradeIt API trading workflow and users’ portfolio data. See Custom Integration.

Linked broker persistence

Linked brokers (and the associated trading account info) are persisted on the device between uses of your app so that users only need to link their broker with your app once. The linked brokers will be reloaded when your app is relaunched and the TradeItSDK is reinstantiated with the call to TradeItSDK.configure(). Persistence is implemented using the secure iOS keychain.

Environments

Important: Both the test and production environments use the brokers’ production environments!

Environment Enum
QA TradeItEmsTestEnv
Production TradeItEmsProductionEnv