Git Product home page Git Product logo

tradeking's Introduction

Tradeking API wrapper

Ruby wrapper for a Tradeking API. Allows access to a Tradeking account's rest operations. Check out the api documentation

Basic Usage

API wrapper can be used from the command line or as part of a Ruby web framework. First install the gem:

gem install tradeking

Instantiate a client with your tradeking credentials. You can get it here

require 'tradeking'
client = Tradeking::Client.new(consumer_key: "YOUR_KEY", consumer_secret: "YOUR_SECRET", access_token: "TOKEN", access_token_secret: "TOKEN_SECRET")

Then access API operations, you can find a full list of operations here

client.get("market/options/expirations")
client.get("market/news/search", {keywords: "ford"})
client.post("watchlists", {id: "MyNewWatchlist", symbols: "AAPL,MSFT"})
client.delete("watchlists/MyList")

Testing

You should be able to run the test suite:

bundle install
rake

You can also run just one test file:

rake test test/tradeking_test.rb

tradeking's People

Contributors

shamne avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mattsoldo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.