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: 9 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
- Archived: true
- Created: 2017-12-18T06:06:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-14T01:04:47.000Z (about 1 year ago)
- Last Synced: 2025-03-26T10:04:17.671Z (10 months ago)
- Topics: bittrex, bittrex-exchange, cryptocoins, cryptocurrency, haskell
- Language: Haskell
- Homepage: http://hackage.haskell.org/package/bittrex
- Size: 68.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
==============================



[](https://travis-ci.org/dmjio/bittrex)
## About
Haskell bindings to the [Bittrex](https://bittrex.com/) cryptocurrency exchange.
## Usage
```haskell
module Main where
import Bittrex
import Control.Monad
import Data.Text (Text)
import qualified Data.Text.IO as T
main :: 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 cs
putStrLn "Ticker for BTC-DOGE market"
t <- getTicker (MarketName BTC_DOGE)
print t
putStrLn "Summary of BTC-DOGE market"
Right t <- getMarketSummary (MarketName BTC_DOGE)
print t
putStrLn "Get market summaries"
Right t <- getMarketSummaries
print t
putStrLn "Order book sells for for BTC-DOGE market"
book <- getOrderBookSells (MarketName BTC_DOGE)
print book
putStrLn "Order book buys for for BTC-DOGE market"
book <- getOrderBookBuys (MarketName BTC_DOGE)
print book
putStrLn "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