Coder Social home page Coder Social logo

nguyenjohn79 / optionshouse-api-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stevecrozz/optionshouse-api-client

1.0 2.0 0.0 101 KB

python wrapper for the optionshouse trading platform api

License: GNU General Public License v3.0

optionshouse-api-client's Introduction

optionshouse-api-client is a simple python wrapper around the optionshouse
trading platform API. The goal of this project is to provide a working, but
minimal, non-magic interface to the API.

Disclaimer:
This API client has some test coverage, but has not gone through any real-world
use yet. I would strongly discourage anyone from using this to place real
orders at this time. If you use this software, you must assume all
responsibility for your actions and the actions of this software package.

==Basic Example Session
from session import Session
s = Session('myusername', 'mypassword')
s.open()
s.quote('GS')
s.close()

==Placing a Simple Order
s = Session('myusername', 'mypassword')
s.open()
order = Order(
  price_type='limit',
  time_in_force='good_till_cancel',
  price='72.50',
  underlying_stock_symbol='COP',
  legs=[
    OrderLeg(
        side='buy',
        security_type='stock',
        quantity=50,
        key='COP:::S',
        multiplier=1,
        position_type='opening',
    )
  ]
)

# Just supply your account id and your order object
s.preview_order(12345, order)

# Looks good? Go ahead and place it
s.place_order(12345, order)
s.close()

==Responses
All of the API requests have structured responses which vary. Take a look in
the tests folder for some examples.

==Supported API Methods
This API client supports all the documented optionshouse API actions. Each one
is available as a method on instances of Session:
* account_activity
* account_cash
* account_info
* account_positions
* cancel_order
* close
* issue_request
* keepalive
* list_orders
* modify_order
* open
* options_list
* parse_response
* place_order
* preview_order
* quote

optionshouse-api-client's People

Contributors

stevecrozz avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.