Giter Site home page Giter Site logo

mcgizzle / haxchange Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 3.0 142 KB

A uniform collection of API bindings for various cryptocurrency exchanges

License: BSD 3-Clause "New" or "Revised" License

Haskell 99.37% Shell 0.63%
arbitrage binance cryptocurrency cryptocurrency-exchanges haskell kraken trading

haxchange's People

Contributors

mcgizzle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

haxchange's Issues

Remove Currency' Data Type

the Currency data type is made of a constructor and an auxiliary data type Currency'

data Currency = FIAT Currency' | COIN Currency'

This is overkill, Currency' should be removed and Currency should follow this layout

data Currency = COIN BTC
              | COIN ETH 
                ...
              | FIAT USD
                ... 

Testing

Implement hspec for testing each of the API functions.

Initially implement it for Kraken.

Then create a template file to be used when added new exchanges.

Types: Parsing incorrect volume

the FromJSON instances for Ticker types are incorrect.

It reads in the incorrect volume.

Update the ticker type to include volumes for both bid and ask, and alter the FromJSON appropriately

Kraken: Parsing JSON result

At the minute, the handleRes function requires a Bool parameter.

handleRes :: (Show a, FromJSON b, AsValue a) => Bool -> Response a -> IO (Either String b)

Where the Bool is used to decide wether to get the members of the result.

let p = if member then res ^? responseBody . key "result" . members
                  else res ^? responseBody . key "result"

this is an un-elegant hack and should be fixed.

Kraken: Clean up Internal

Refactor out url into function

getUrl :: Opts ->  ([String] -> String) -> String

This can be used to create

getUri :: Opts -> ([String] -> String) -> String
getUri = getUrl (someFunc..)

Should this be generalised to all exchanges and placed in the Utils module?

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.