Giter VIP home page Giter VIP logo

iboga's Introduction

IBoga

Iboga is a data driven clojure wrapper around Interactive Brokers' Java api client.

Iboga is currently very experimental and will be subject to frequent breaking changes.

Installation

Iboga requires that the the Java tws-api client be compiled with the javac --parameters flag to enable access to parameter names via reflection. The following tool does the installation for you in a single command.

https://github.com/jjttjj/tws-install

Once that is done, you will need to add the iboga dependency as well as the tws dependency to your deps.edn to use iboga in your project.

com.interactivebrokers/tws-api {:mvn/version "979.01-with-parameters"}
dev.jt/iboga {:git/url "https://github.com/jjttjj/iboga.git"
             :sha     "0c99d5cdf5389da30cd095b947d779d15c2b92b5"}

Usage

See examples for current usage examples.

License

Copyright © 2020 Justin Tirrell

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version. https://opensource.org/licenses/EPL-1.0

iboga's People

Contributors

jjttjj avatar

Stargazers

merik avatar  avatar Léon Talbot avatar Alberto Fernández avatar Mac Heller-Ogden avatar Martinffx avatar  avatar Paul Legato avatar awb99 avatar  avatar Kamuela Franco avatar Albertc avatar fred monroe avatar Josef Pospíšil avatar Dmitri Sotnikov avatar Divyansh Prakash avatar Alberto Fernandez avatar Gerred Dillon avatar Paulo Ratinho avatar  avatar Rune Brinckmeyer avatar  avatar Dima Novotochinov avatar Jason Hall avatar  avatar Sivaharan Rajkumar avatar Shawn Zhang avatar  avatar Roman Pearah avatar Vitalie Spinu avatar

Watchers

Paul Legato avatar  avatar James Cloos avatar  avatar Burin Choomnuan avatar Jason Hall avatar  avatar Paulo Ratinho avatar

iboga's Issues

Qualified vs Unqualified keywords

Currently qualified keywords are used internally.

They are needed for spec, and I thought I might be able to take advantage of being able to dispatch on a globally unique key with no further context in the same way that spec does for other features besides spec, such as transformation to and from values IB expects/provides, and extension points such as giving a default value to a request parameter, and things such as associating request types with response types and "ending response" types, so that synchronous request can be built upon this data.

Qualified keywords are unwieldy for an enduser to use.

Are they also to unwieldy to an implementer of extension points to use?

Should iboga be built on qualified keywords everywhere, and the unqualifying step be either built on top of this, and/or manually done by the user?

In order for the qualifying step to be opt-in, we would need to change the incoming message handler system so that handlers could be applied in an ordered manner. Or have the unqualifying handler be special, or just an option specified on client creation.

Alternatively, we could go in the opposite directions, and not qualify keywords as often internally, possibly only use them for spec. For example, default request parameters don't need qualified keys. Nested maps can generally replace a hierarchical keyword.

What dispatch mechanism should be used for extension points?

Currently Iboga uses its own "dispatch mechanism", as seen here. Essentially it just keeps a big map in an atom of qualified keywords to maps of functionality implemented for that keyword.

This could also be implemented as multimethods, which has the advantage of being a standard clojure.core feature. However, multimethods feel like they're a bit overkill when they just dispatch on a keyword, and are a bit awkward when we really want to associate data with a keyword and not functionality.

I'm not in love with the naming and terminology of the current setup: set-schema! and "attributes".

Enum values in data types.

Example: the algoStrategy property in com.ib.client.Order is a string internally but has setters for both a string and the com.ib.client.Types$AlgoStrategy enum, but that enum contains a subset of the valid algostrategy types and the remaining must be set with the string setter. The getter method .algoStrategy returns the enum, which will have a value of "None" if it is not a valid com.ib.client.Types$AlgoStrategy value. We need to use getAlgoStrategy to get the string version.

Should the getters with a possible getX value as well as a enum getter always return the string getX variant?

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.