Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runeksvendsen/crypto-venues
Fetch order books from various cryptocurrency exchanges
https://github.com/runeksvendsen/crypto-venues
cryptocurrency cryptocurrency-markets exchange-api orderbook
Last synced: 11 days ago
JSON representation
Fetch order books from various cryptocurrency exchanges
- Host: GitHub
- URL: https://github.com/runeksvendsen/crypto-venues
- Owner: runeksvendsen
- License: bsd-3-clause
- Created: 2018-02-05T12:19:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-08T09:14:18.000Z (11 months ago)
- Last Synced: 2024-01-09T09:59:07.635Z (10 months ago)
- Topics: cryptocurrency, cryptocurrency-markets, exchange-api, orderbook
- Language: Haskell
- Homepage:
- Size: 221 KB
- Stars: 5
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cryptocurrency venues
[](https://github.com/runeksvendsen/crypto-venues/actions/workflows/build.yml)
### Fetch order book data from various cryptocurrency exchanges.
[Currently supported venues](https://github.com/runeksvendsen/crypto-venues/tree/ebf1fcbcee80bf71721cd581c2751476dffbbc45/src/CryptoVenues/Venues.hs#L30-L34).
This library enables:
1. Fetching the list of available cryptocurrency markets for a given exchange/venue
2. Fetching the order book for the given cryptocurrency market
3. Throttling/rate-limiting requests, by using the specific exchange's rate-limit (and backing off if a "Too Many Requests"-HTTP error is received)The fetched order books are compatible with the [`orderbook`](https://github.com/runeksvendsen/orderbook) library, which we can then use to query the liquidity of the given market.
## CLI
The functionality of this library is exposed as the CLI application [rest-depth](https://github.com/runeksvendsen/rest-depth).
## Development
To add support for a new exchange, implement the [`EnumMarkets`](https://github.com/runeksvendsen/crypto-venues/blob/dc093651d15a19d6d8185454bcf08c1284ab8bfa/src/Fetch/EnumMarkets.hs#L16) class (which retrieves a list of supported markets) for the given exchange, as well as the [`MarketBook`](https://github.com/runeksvendsen/crypto-venues/blob/dc093651d15a19d6d8185454bcf08c1284ab8bfa/src/Fetch/MarketBook.hs#L29) class which:
1. Retrieves an orderbook when given a `Market` returned by the `EnumMarkets` implementation
2. Returns the rate limit for fetching orderbooks from the given exchange### Testing
Note that Binance restricts the IP addresses that can access its services, so that US IP addresses are denied access. Because the VMs for the GitHub CI are located in the US, the tests for Binance are disabled for the GitHub CI.