Documentation

Ruby Example

require 'net/https'
require 'openssl'
require 'uri'

uri  = URI.parse('https://api.tradier.com/v1/user/profile')

pem  = File.read('/usr/local/etc/openssl/cert.pem')
cert = OpenSSL::X509::Certificate.new(pem)

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.cert_store = OpenSSL::X509::Store.new
http.cert_store.set_default_paths
http.cert_store.add_cert(cert)

request                  = Net::HTTP::Get.new(uri.request_uri)
request['Accept']        = 'application/xml'
request['Authorization'] = 'Bearer YOUR_ACCESS_TOKEN'

response = http.request(request)

puts response.body

Tradier Inc. and its corresponding technology services (including API services) are distinct and separate from the services provided by Tradier Brokerage Inc. For more information regarding the services of Tradier, Inc., please contact techsupport@tradier.com. For more information regarding the services of Tradier Brokerage, Inc. please contact service@tradierbrokerage.com. Tradier Brokerage Inc. Member FINRA/SIPC

© 2017 Tradier Inc.
  • 11016 Rushmore Drive, Suite 350
  • Charlotte, NC 28277

All materials contained on this site and specifically the API documentation pages are protected by United States copyright law and may not be copied, reproduced, distributed, transmitted, displayed, published or broadcast without the prior written permission of Tradier Inc. The Structure, Format, Layout, Examples and Design of the pages are owned by Tradier Inc, and any efforts to willfully or accidently duplicate a whole or part of the pages on this site is a violation of United States copyright law.