mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
* init * updates config * wrapper configuration * updates exchange readme * adds SendAuthHTTPRequest and SendHTTPRequest * adds ratelimit file * adds test case and minor fixes * improve error handling * update testcases and improve GetSymbols API * adds SPOT API's * minor fix * WIP * WIP * adds test case * adds check in test case * fixes in Auth. HTTP * improvements * adds trade, kline support and testcases * adds SPOT API and testcases for same * adds SPOT API and testcases * adds SPOT API and testcase * WIP * adds API's * adds API's * adds test cases * adds comment to exported data types * adds API and test cases * adds API * adds API * rearrange functions * WIP: adds API * adds API for Post Order SPOT * adds API and few fixes * fixes * WIP * WIP * add PostBulkOrder API and its test case * fix issues * adds cancel order APIs and test cases for same * add minor test fixes * add API * adds API * fixes * add API * adds API and test cases * fix test * adds API * adds test * fix test * adds API and test * adds deposit API and test cases * WIP * adds API and test cases * WIP * WIP * add public future API and test cases * WIP * remove v2 API and replace them with v1 * update test cases * adds future order API and test cases * adds futures order API * adds API * add API and test cases * adds API and test cases * adds API and test cases * adds API and test cases * Adding wrapper functions * Fix on wrapper function * Adding websocket support * Complete addressing WS push datas * Adding spot push data unit tests * adding futures websocket push data handlers * Adding futures websocket push data handlers * Added unit tests * Updating unit tests * Updating wrapper and unit test functions * Adding missing wrapper functions and code cleaning up * Resolved linter issues * Fixing websocket issues * Fixing websocket issues * Slight fix on config_example file * Minor update * Basic nits updates * Fix minor linter issues * Minor update * Minor unit test update * Minor unit test update * Code update and linter issues fix * Removed unnecessary type conversion codes * Monor update based on review comment * Fix based on review comments * Adding rate-limiter * Websocket update and overall minor fixes * Removed IsAssetTypeEnabled method implementation * Fix connection and formatting issues * Updating orderbook issues * Very minor label fix * Minor error returning fix * code cleaning up and minor spelling fix * Updates on unit test * Update on unit tests and slight code structure * unit test update * orderbook update and minor fix * fix on race * Mini linter fix * fix minor parameter and unit test issues * handler funcs and models update * Fixing websocket and unit test issues * order side string for active orders * Fix on websocket and unit tests * Minor type changes * Minor Orderbook fix and unit test update * Small fix on orderbook * Updating orderbook functionality * FIx on websocket orderbook handlers * Small update on kucoin websocket * fix missed review comments * fix based on review comments * Updating websocket orderbook and fixing unit tests * Minor fixes * unit test update * Updating unit test according to enabled asset type * toggle canManipulateRealOrders const * Unit test update * Fix minor issues * minor fix * documentation fix * wrapper coverage and unused params fix * testing and minor changes * documentation, websocket and unit test update * minor linter fix * Websocket spot/margin subscription update * minor ticker update fix * minor fixes on endpoints * timestamp and number convert method and unit tests * timestamp convert minor update * minor type and conversion fix * create a common timestamp convert and fix minor issues * linter and ticker fix * Updating unit tests and order placing endpoint methods * Added a pairs check * Fix config test error * rm unused error variable * Fix source of linter issue * code update: convert, wrapper and websocket fix * minor code update * Websocket code and unit tests update * Websocket ticker ask/bid type change and small error msg fix * docs update * fix: websocket orderbook handling * change orderbook channel to marketOrderbookLevel2Channels and fix websocket orderbook update * Minor func rename and reciever change * Minor orderbook unit test issue fix * comment: about why we used a random delimiter '-' for futures * update config files and FetchTradablePair func for futures pairs * futures config pairs update * remove ConnextionMonitorDelay from websocket setup * fix on types and futures pair conversion * updating config pairs * change NewPairFromString to DeriveFrom * unit tests update * unit tests update * Added TickerBatching * added GetStandardConfig to GetDefaultConfig --------- Co-authored-by: Jaydeep Rajpurohit <jaydeeppurohit1996@gmail.com>
78 lines
2.9 KiB
Cheetah
78 lines
2.9 KiB
Cheetah
{{define "exchanges trade" -}}
|
|
{{template "header" .}}
|
|
## Current Features for {{.Name}}
|
|
|
|
+ The trade package contains a processor for both REST and websocket trade history processing
|
|
+ Its primary purpose is to collect trade data from multiple sources and save it to the database's trade table
|
|
+ If you do not have database enabled, then trades will not be processed
|
|
|
|
### Requirements to save a trade to the database
|
|
+ Database has to be enabled
|
|
+ Under `config.json`, under your selected exchange, enable the field `saveTradeData`
|
|
+ This will enable trade processing to occur for that specific exchange
|
|
+ This can also be done via gRPC under the `SetExchangeTradeProcessing` command
|
|
|
|
### Usage
|
|
+ To send trade data to be processed, use the following example:
|
|
```
|
|
err := trade.AddTradesToBuffer(b.Name, trade.Data{
|
|
Exchange: b.Name,
|
|
TID: strconv.FormatInt(tradeData[i].TID, 10),
|
|
CurrencyPair: p,
|
|
AssetType: assetType,
|
|
Side: side,
|
|
Price: tradeData[i].Price,
|
|
Amount: tradeData[i].Amount,
|
|
Timestamp: tradeTS,
|
|
})
|
|
```
|
|
_b in this context is an `IBotExchange` implemented struct_
|
|
|
|
### Rules
|
|
+ If the trade processor has not started, it will automatically start upon being sent trade data.
|
|
+ The processor will add all received trades to a buffer
|
|
+ After 15 seconds, the trade processor will parse and save all trades on the buffer to the trade table
|
|
+ This is to save on constant writing to the database. Trade data, especially when received via websocket would cause massive issues on the round trip of saving data for every trade
|
|
+ If the processor has not received any trades in that 15 second timeframe, it will shut down.
|
|
+ Sending trade data to it later will automatically start it up again
|
|
|
|
|
|
## Exchange Support Table
|
|
|
|
| Exchange | Recent Trades via REST | Live trade updates via Websocket | Trade history via REST |
|
|
|----------|------|-----------|-----|
|
|
| Alphapoint | No | No | No |
|
|
| Binance.US | Yes | Yes | NA |
|
|
| Binance| Yes | Yes | Yes |
|
|
| Bitfinex | Yes | Yes | Yes |
|
|
| Bitflyer | Yes | No | No |
|
|
| Bithumb | Yes | Yes | No |
|
|
| BitMEX | Yes | Yes | Yes |
|
|
| Bitstamp | Yes | Yes | No |
|
|
| Bittrex | Yes | Yes | No |
|
|
| BTCMarkets | Yes | Yes | No |
|
|
| BTSE | Yes | Yes | No |
|
|
| Bybit | Yes | Yes | Yes |
|
|
| CoinbasePro | Yes | Yes | No|
|
|
| COINUT | Yes | Yes | No |
|
|
| Exmo | Yes | NA | No |
|
|
| GateIO | Yes | Yes | No |
|
|
| Gemini | Yes | Yes | Yes |
|
|
| HitBTC | Yes | Yes | Yes |
|
|
| Huobi.Pro | Yes | Yes | No |
|
|
| ItBit | Yes | NA | No |
|
|
| Kraken | Yes | Yes | No |
|
|
| Kucoin | Yes | No | Yes |
|
|
| Lbank | Yes | No | Yes |
|
|
| Okcoin | Yes | Yes | Yes |
|
|
| Okx | Yes | Yes | Yes |
|
|
| Poloniex | Yes | Yes | Yes |
|
|
| Yobit | Yes | NA | No |
|
|
| ZB.COM | Yes | Yes | No |
|
|
|
|
|
|
### Please click GoDocs chevron above to view current GoDoc information for this package
|
|
{{template "contributions"}}
|
|
{{template "donations" .}}
|
|
{{end}}
|