Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmjio/bittrex
:money_with_wings: Haskell bindings to the Bittrex cryptocurrency exchange
https://github.com/dmjio/bittrex
bittrex bittrex-exchange cryptocoins cryptocurrency haskell
Last synced: about 2 months ago
JSON representation
:money_with_wings: Haskell bindings to the Bittrex cryptocurrency exchange
- Host: GitHub
- URL: https://github.com/dmjio/bittrex
- Owner: dmjio
- License: bsd-3-clause
- Created: 2017-12-18T06:06:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-15T00:57:29.000Z (about 6 years ago)
- Last Synced: 2024-11-10T02:42:55.351Z (about 2 months ago)
- Topics: bittrex, bittrex-exchange, cryptocoins, cryptocurrency, haskell
- Language: Haskell
- Homepage: http://hackage.haskell.org/package/bittrex
- Size: 67.4 KB
- Stars: 23
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
bittrex
==============================
![Hackage](https://img.shields.io/hackage/v/bittrex.svg)
![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)
![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)
[![Build Status](https://travis-ci.org/dmjio/bittrex.svg?branch=master)](https://travis-ci.org/dmjio/bittrex)## About
Haskell bindings to the [Bittrex](https://bittrex.com/) cryptocurrency exchange.
## Usage
```haskell
module Main whereimport Bittrex
import Control.Monad
import Data.Text (Text)
import qualified Data.Text.IO as Tmain :: IO ()
main = do
[api,secret] <- lines <$> readFile "/Users/david/.bittrex"
let keys = APIKeys api secret-- Public Usage
putStrLn "Markets"
Right ms <- getMarkets
forM_ ms (print . marketName)putStrLn "Currencies"
Right cs <- getCurrencies
mapM_ print csputStrLn "Ticker for BTC-DOGE market"
t <- getTicker (MarketName BTC_DOGE)
print tputStrLn "Summary of BTC-DOGE market"
Right t <- getMarketSummary (MarketName BTC_DOGE)
print tputStrLn "Get market summaries"
Right t <- getMarketSummaries
print tputStrLn "Order book sells for for BTC-DOGE market"
book <- getOrderBookSells (MarketName BTC_DOGE)
print bookputStrLn "Order book buys for for BTC-DOGE market"
book <- getOrderBookBuys (MarketName BTC_DOGE)
print bookputStrLn "Market history for BTC-DOGE"
Right history <- getMarketHistory (MarketName BTC_DOGE)
forM_ history print-- Market usage
putStrLn "Retrieve your open orders"
Right openOrders <- getOpenOrders keys (MarketName BTC_DOGE)
forM_ openOrders print-- Account usage,
putStrLn "Check your balances (for all currencies)"
Right balances <- getBalances keys
forM_ balances print
```## License
[BSD3](LICENSE) © David Johnson