Skip to content
mitochondrion edited this page Dec 6, 2016 · 14 revisions

Initializing the TradeItLauncher

To use the SDK, first instantiate the TradeItLauncher:

let launcher = TradeItLauncher(apiKey: API_KEY, environment: TradeItEmsTestEnv)

It serves as the global managing object for the SDK.

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 Trade.it trading, portfolio, and account management into an app. See "Launching pre built UI".
  • The SDK also includes a set of classes that allow developers to build custom screens and UI workflows for "deep integration" with the Trade.it API trading workflow and users' portfolio data. See "Deep Integration".

Linked Brokers

Whenever a user links their broker, the SDK will automatically save the link (in the form of the associated Trade.it OAuth token) in the secure iOS keychain. When the app is relaunched and the TradeItLauncher is reinstantiated, the saved brokers are loaded from the keychain.

Environments

Environment Enum
Sandbox TradeItEmsTestEnv
Production TradeItEmsProductionEnv

x

Clone this wiki locally