This is the official OmniAuth strategy for authenticating with Tradier's API. To use it, you'll need a Client ID and Secret which can be obtained from developer.tradier.com.
Add the strategy to your Gemfile:
gem 'omniauth-tradier'Then integrate the strategy into your middleware:
use OmniAuth::Builder do
provider :tradier, ENV['CLIENT_ID'], ENV['SECRET']
endIn Rails, you'll want to add to the middleware stack:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :tradier, ENV['CLIENT_ID'], ENV['SECRET']
endTradier's API lets you set scopes to provide granular access to different types of data:
use OmniAuth::Builder do
provider :tradier, ENV['CLIENT_ID'], ENV['SECRET'], :scope => "read,write,trade"
endFor more information on available scopes, refer to Tradier's API documentation.
Copyright (c) 2013 Tradier Inc. See LICENSE for details.



