cmd/exchange_template: Update wrapper template, improve documentation (#2009)

* Updating wrapper template, updating documentation, regenerating documentation

* Renaming "streaming api" to "websocket"

* Context is now t

* Update docs/ADD_NEW_EXCHANGE.md

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* Update cmd/documentation/root_templates/root_readme.tmpl

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>

* Fixes an improper example and regenerates documentation

* Corrects typos

* Makes a table label consistent across files

---------

Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
cranktakular
2025-11-11 11:07:26 +11:00
committed by GitHub
parent 6077707690
commit 2fd4f5ec5b
54 changed files with 145 additions and 146 deletions

View File

@@ -10,33 +10,33 @@ xtda | https://github.com/xtda
lrascao | https://github.com/lrascao
Beadko | https://github.com/Beadko
samuael | https://github.com/samuael
ydm | https://github.com/ydm
vazha | https://github.com/vazha
ydm | https://github.com/ydm
Rots | https://github.com/Rots
ermalguni | https://github.com/ermalguni
MadCozBadd | https://github.com/MadCozBadd
Copilot | https://github.com/apps/copilot-swe-agent
vadimzhukck | https://github.com/vadimzhukck
junnplus | https://github.com/junnplus
geseq | https://github.com/geseq
marcofranssen | https://github.com/marcofranssen
140am | https://github.com/140am
TaltaM | https://github.com/TaltaM
cranktakular | https://github.com/cranktakular
TaltaM | https://github.com/TaltaM
dackroyd | https://github.com/dackroyd
khcchiu | https://github.com/khcchiu
yangrq1018 | https://github.com/yangrq1018
crackcomm | https://github.com/crackcomm
romanornr | https://github.com/romanornr
woshidama323 | https://github.com/woshidama323
Copilot | https://github.com/apps/copilot-swe-agent
mshogin | https://github.com/mshogin
herenow | https://github.com/herenow
tk42 | https://github.com/tk42
soxipy | https://github.com/soxipy
Asalei | https://github.com/Asalei
lozdog245 | https://github.com/lozdog245
if1live | https://github.com/if1live
romanornr | https://github.com/romanornr
crackcomm | https://github.com/crackcomm
azhang | https://github.com/azhang
if1live | https://github.com/if1live
lozdog245 | https://github.com/lozdog245
Asalei | https://github.com/Asalei
soxipy | https://github.com/soxipy
tk42 | https://github.com/tk42
herenow | https://github.com/herenow
mshogin | https://github.com/mshogin
andreygrehov | https://github.com/andreygrehov
bretep | https://github.com/bretep
Christian-Achilli | https://github.com/Christian-Achilli
@@ -44,8 +44,8 @@ dsinuela-taurus | https://github.com/dsinuela-taurus
cornelk | https://github.com/cornelk
gam-phon | https://github.com/gam-phon
MarkDzulko | https://github.com/MarkDzulko
mortensorensen | https://github.com/mortensorensen
cavapoo2 | https://github.com/cavapoo2
MathieuCesbron | https://github.com/MathieuCesbron
aidan-bailey | https://github.com/aidan-bailey
tongxiaofeng | https://github.com/tongxiaofeng
tonywangcn | https://github.com/tonywangcn
varunbhat | https://github.com/varunbhat
@@ -55,17 +55,21 @@ vyloy | https://github.com/vyloy
arttobe | https://github.com/arttobe
shoman4eg | https://github.com/shoman4eg
cangqiaoyuzhuo | https://github.com/cangqiaoyuzhuo
dazi005 | https://github.com/dazi005
gcmutator | https://github.com/gcmutator
gopherorg | https://github.com/gopherorg
yuhangcangqian | https://github.com/yuhangcangqian
whilei | https://github.com/whilei
xiiiew | https://github.com/xiiiew
yuhangcangqian | https://github.com/yuhangcangqian
keeghcet | https://github.com/keeghcet
mickychang9 | https://github.com/mickychang9
phieudu241 | https://github.com/phieudu241
quantpoet | https://github.com/quantpoet
snipesjr | https://github.com/snipesjr
snussik | https://github.com/snussik
taewdy | https://github.com/taewdy
threehonor | https://github.com/threehonor
aidan-bailey | https://github.com/aidan-bailey
xiiiew | https://github.com/xiiiew
youzichuan | https://github.com/youzichuan
antonzhukov | https://github.com/antonzhukov
blombard | https://github.com/blombard
CodeLingoBot | https://github.com/CodeLingoBot
@@ -89,5 +93,8 @@ mattkanwisher | https://github.com/mattkanwisher
mgravitt | https://github.com/mgravitt
mKurrels | https://github.com/mKurrels
m1kola | https://github.com/m1kola
mortensorensen | https://github.com/mortensorensen
Polizo96 | https://github.com/Polizo96
cavapoo2 | https://github.com/cavapoo2
idoall | https://github.com/idoall
starit | https://github.com/starit

View File

@@ -16,7 +16,8 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
## Exchange Support Table
| Exchange | REST API | Streaming API | FIX API |
| Exchange | REST API | Websocket API | FIX API |
``
|----------|------|-----------|-----|
| Binance.US| Yes | Yes | NA |
| Binance| Yes | Yes | NA |
@@ -149,43 +150,43 @@ Binaries will be published once the codebase reaches a stable condition.
|User|Contribution Amount|
|--|--|
| [thrasher-](https://github.com/thrasher-) | 731 |
| [dependabot[bot]](https://github.com/apps/dependabot) | 386 |
| [shazbert](https://github.com/shazbert) | 374 |
| [gloriousCode](https://github.com/gloriousCode) | 237 |
| [gbjk](https://github.com/gbjk) | 133 |
| [thrasher-](https://github.com/thrasher-) | 737 |
| [dependabot[bot]](https://github.com/apps/dependabot) | 415 |
| [shazbert](https://github.com/shazbert) | 389 |
| [gloriousCode](https://github.com/gloriousCode) | 240 |
| [gbjk](https://github.com/gbjk) | 143 |
| [dependabot-preview[bot]](https://github.com/apps/dependabot-preview) | 88 |
| [xtda](https://github.com/xtda) | 47 |
| [lrascao](https://github.com/lrascao) | 27 |
| [Beadko](https://github.com/Beadko) | 24 |
| [samuael](https://github.com/samuael) | 15 |
| [ydm](https://github.com/ydm) | 15 |
| [samuael](https://github.com/samuael) | 16 |
| [vazha](https://github.com/vazha) | 15 |
| [ydm](https://github.com/ydm) | 15 |
| [Rots](https://github.com/Rots) | 15 |
| [ermalguni](https://github.com/ermalguni) | 14 |
| [MadCozBadd](https://github.com/MadCozBadd) | 13 |
| [Copilot](https://github.com/apps/copilot-swe-agent) | 13 |
| [vadimzhukck](https://github.com/vadimzhukck) | 10 |
| [junnplus](https://github.com/junnplus) | 9 |
| [geseq](https://github.com/geseq) | 8 |
| [marcofranssen](https://github.com/marcofranssen) | 8 |
| [140am](https://github.com/140am) | 8 |
| [cranktakular](https://github.com/cranktakular) | 7 |
| [TaltaM](https://github.com/TaltaM) | 6 |
| [cranktakular](https://github.com/cranktakular) | 6 |
| [dackroyd](https://github.com/dackroyd) | 5 |
| [khcchiu](https://github.com/khcchiu) | 5 |
| [yangrq1018](https://github.com/yangrq1018) | 4 |
| [crackcomm](https://github.com/crackcomm) | 3 |
| [romanornr](https://github.com/romanornr) | 3 |
| [woshidama323](https://github.com/woshidama323) | 3 |
| [Copilot](https://github.com/apps/copilot-swe-agent) | 3 |
| [mshogin](https://github.com/mshogin) | 2 |
| [herenow](https://github.com/herenow) | 2 |
| [tk42](https://github.com/tk42) | 2 |
| [soxipy](https://github.com/soxipy) | 2 |
| [Asalei](https://github.com/Asalei) | 2 |
| [lozdog245](https://github.com/lozdog245) | 2 |
| [if1live](https://github.com/if1live) | 2 |
| [romanornr](https://github.com/romanornr) | 3 |
| [crackcomm](https://github.com/crackcomm) | 3 |
| [azhang](https://github.com/azhang) | 2 |
| [if1live](https://github.com/if1live) | 2 |
| [lozdog245](https://github.com/lozdog245) | 2 |
| [Asalei](https://github.com/Asalei) | 2 |
| [soxipy](https://github.com/soxipy) | 2 |
| [tk42](https://github.com/tk42) | 2 |
| [herenow](https://github.com/herenow) | 2 |
| [mshogin](https://github.com/mshogin) | 2 |
| [andreygrehov](https://github.com/andreygrehov) | 2 |
| [bretep](https://github.com/bretep) | 2 |
| [Christian-Achilli](https://github.com/Christian-Achilli) | 2 |
@@ -193,8 +194,8 @@ Binaries will be published once the codebase reaches a stable condition.
| [cornelk](https://github.com/cornelk) | 2 |
| [gam-phon](https://github.com/gam-phon) | 2 |
| [MarkDzulko](https://github.com/MarkDzulko) | 2 |
| [mortensorensen](https://github.com/mortensorensen) | 1 |
| [cavapoo2](https://github.com/cavapoo2) | 1 |
| [MathieuCesbron](https://github.com/MathieuCesbron) | 2 |
| [aidan-bailey](https://github.com/aidan-bailey) | 1 |
| [tongxiaofeng](https://github.com/tongxiaofeng) | 1 |
| [tonywangcn](https://github.com/tonywangcn) | 1 |
| [varunbhat](https://github.com/varunbhat) | 1 |
@@ -204,17 +205,21 @@ Binaries will be published once the codebase reaches a stable condition.
| [arttobe](https://github.com/arttobe) | 1 |
| [shoman4eg](https://github.com/shoman4eg) | 1 |
| [cangqiaoyuzhuo](https://github.com/cangqiaoyuzhuo) | 1 |
| [dazi005](https://github.com/dazi005) | 1 |
| [gcmutator](https://github.com/gcmutator) | 1 |
| [gopherorg](https://github.com/gopherorg) | 1 |
| [yuhangcangqian](https://github.com/yuhangcangqian) | 1 |
| [whilei](https://github.com/whilei) | 1 |
| [xiiiew](https://github.com/xiiiew) | 1 |
| [yuhangcangqian](https://github.com/yuhangcangqian) | 1 |
| [keeghcet](https://github.com/keeghcet) | 1 |
| [mickychang9](https://github.com/mickychang9) | 1 |
| [phieudu241](https://github.com/phieudu241) | 1 |
| [quantpoet](https://github.com/quantpoet) | 1 |
| [snipesjr](https://github.com/snipesjr) | 1 |
| [snussik](https://github.com/snussik) | 1 |
| [taewdy](https://github.com/taewdy) | 1 |
| [threehonor](https://github.com/threehonor) | 1 |
| [aidan-bailey](https://github.com/aidan-bailey) | 1 |
| [xiiiew](https://github.com/xiiiew) | 1 |
| [youzichuan](https://github.com/youzichuan) | 1 |
| [antonzhukov](https://github.com/antonzhukov) | 1 |
| [blombard](https://github.com/blombard) | 1 |
| [CodeLingoBot](https://github.com/CodeLingoBot) | 1 |
@@ -238,5 +243,8 @@ Binaries will be published once the codebase reaches a stable condition.
| [mgravitt](https://github.com/mgravitt) | 1 |
| [mKurrels](https://github.com/mKurrels) | 1 |
| [m1kola](https://github.com/m1kola) | 1 |
| [mortensorensen](https://github.com/mortensorensen) | 1 |
| [Polizo96](https://github.com/Polizo96) | 1 |
| [cavapoo2](https://github.com/cavapoo2) | 1 |
| [idoall](https://github.com/idoall) | 1 |
| [starit](https://github.com/starit) | 1 |

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := c.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := c.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := d.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := e.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := g.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := g.Trade(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := h.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := h.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := k.Trade(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := l.Trade(...)
if err != nil {
// Handle error

View File

@@ -93,7 +93,7 @@ if err != nil {
// Private calls - make sure your APIKEY and APISECRET are set and
// AuthenticatedAPISupport is set to true
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
orderID, err := ok.SubmitOrder(...)
if err != nil {
// Handle error

View File

@@ -86,7 +86,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := p.PlaceOrder(...)
if err != nil {
// Handle error

View File

@@ -85,7 +85,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := y.Trade("BTCUSD", "MARKET", 1, 2)
if err != nil {
// Handle error

View File

@@ -17,7 +17,8 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
## Exchange Support Table
| Exchange | REST API | Streaming API | FIX API |
| Exchange | REST API | Websocket API | FIX API |
``
|----------|------|-----------|-----|
| Binance.US| Yes | Yes | NA |
| Binance| Yes | Yes | NA |

View File

@@ -53,14 +53,14 @@ func (e *Exchange) SetDefaults() {
fmt1 := currency.PairStore{
AssetEnabled: true,
RequestFormat: &currency.PairFormat{Uppercase: true},
ConfigFormat: &currency.PairFormat{Uppercase: true},
RequestFormat: &currency.PairFormat{Uppercase: true, Delimiter: "_"},
ConfigFormat: &currency.PairFormat{Uppercase: true, Delimiter: "_"},
}
fmt2 := currency.PairStore{
AssetEnabled: true,
RequestFormat: &currency.PairFormat{Uppercase: true},
ConfigFormat: &currency.PairFormat{Uppercase: true, Delimiter: ":"},
RequestFormat: &currency.PairFormat{Uppercase: true, Delimiter: "-"},
ConfigFormat: &currency.PairFormat{Uppercase: true, Delimiter: "_"},
}
if err := e.SetAssetPairStore(asset.Spot, fmt1); err != nil {

View File

@@ -65,7 +65,7 @@ type job struct {
ID uuid.UUID
}
// Mux defines a new multiplexer for the dispatch system, these a generated
// Mux defines a new multiplexer for the dispatch system, these are generated
// per subsystem
type Mux struct {
// Reference to the main running dispatch service

View File

@@ -22,7 +22,7 @@ This document is from a perspective of adding a new exchange called Binance to t
#### Linux/macOS
GoCryptoTrader is built using [Go Modules](https://github.com/golang/go/wiki/Modules) and requires Go 1.11 or above
GoCryptoTrader is built using [Go Modules](https://go.dev/wiki/Modules) and requires Go 1.11 or above
Using Go Modules you now clone this repository **outside** your GOPATH
```console
@@ -90,48 +90,34 @@ go build && gocryptotrader.exe --config=config_example.json
Similar to the configs, spot support is inbuilt but other asset types will need to be manually supported
```go
spot := currency.PairStore{
AssetEnabled: true,
RequestFormat: &currency.PairFormat{
Uppercase: true,
Delimiter: "/",
},
ConfigFormat: &currency.PairFormat{
Uppercase: true,
Delimiter: "/",
},
}
futures := currency.PairStore{
AssetEnabled: true,
RequestFormat: &currency.PairFormat{
Uppercase: true,
Delimiter: "-",
},
ConfigFormat: &currency.PairFormat{
Uppercase: true,
Delimiter: "-",
},
}
fmt1 := currency.PairStore{
AssetEnabled: true,
RequestFormat: &currency.PairFormat{Uppercase: true, Delimiter: "_"},
ConfigFormat: &currency.PairFormat{Uppercase: true, Delimiter: "_"},
}
err := e.SetAssetPairStore(asset.Spot, spot)
if err != nil {
log.Errorf(log.ExchangeSys, "%s error storing `spot` default asset formats: %s", bi.Name, err)
}
fmt2 := currency.PairStore{
AssetEnabled: true,
RequestFormat: &currency.PairFormat{Uppercase: true, Delimiter: "-"},
ConfigFormat: &currency.PairFormat{Uppercase: true, Delimiter: "_"},
}
err = e.SetAssetPairStore(asset.Futures, futures)
if err != nil {
log.Errorf(log.ExchangeSys, "%s error storing `futures` default asset formats: %s", bi.Name, err)
}
if err := e.SetAssetPairStore(asset.Spot, fmt1); err != nil {
log.Errorf(log.ExchangeSys, "%s error storing %q default asset formats: %s", e.Name, asset.Spot, err)
}
if err := e.SetAssetPairStore(asset.Futures, fmt2); err != nil {
log.Errorf(log.ExchangeSys, "%s error storing %q default asset formats: %s", e.Name, asset.Futures, err)
}
```
### Document the addition of the new exchange (Binance exchange is used as an example below)
**Yes** means supported, **No** means not yet implemented and **NA** means protocol unsupported
**Yes** means supported, **No** means not yet implemented and **NA** means protocol unsupported by the exchange
#### Add exchange to the [root README template](/cmd/documentation/root_templates/root_readme.tmpl) file
```go
| Exchange | REST API | Streaming API | FIX API |
| Exchange | REST API | Websocket API | FIX API |
|----------|------|-----------|-----|
| Binance| Yes | Yes | NA | // <-------- new exchange
| Bitfinex | Yes | Yes | NA |
@@ -320,7 +306,7 @@ Modify existing constants or create new ones to define the API URL paths, as app
apiURL = "https://api.binance.com"
```
Create a get function in `rest.go` file and unmarshall the data in the created type:
Create a get function in the `rest.go` file and unmarshal the data in the created type:
```go
// GetExchangeInfo returns exchange information. Check types for more
@@ -336,11 +322,8 @@ Create a test function in `rest_test.go` to see if the data is received and unma
```go
func TestGetExchangeInfo(t *testing.T) {
t.Parallel() // adding t.Parallel() is preferred as it allows tests to run simultaneously, speeding up package test time
// Either set verbose to true for more detailed output as shown below:
e.Verbose = true
// Or alternatively you can use:
// result, err := e.GetExchangeInfo(request.WithVerbose(context.Background()))
result, err := e.GetExchangeInfo(context.Background())
result, err := e.GetExchangeInfo(t.Context())
require.NoError(t, err)
t.Log(result)
assert.NotNil(t, result)
@@ -349,10 +332,10 @@ func TestGetExchangeInfo(t *testing.T) {
Set `Verbose` to `true` to view received data during unmarshalling errors.
After testing, remove `Verbose`, the result variable, and `t.Log(result)`, or replace the log with `assert.NotNil(t, result)` to avoid unnecessary output when running GCT.
Alternatively you can use `request.WithVerbose(context.Background())` as the `context` param to achieve the same result.
Alternatively you can use `request.WithVerbose(t.Context())` as the `context` param to achieve the same result.
```go
result, err := e.GetExchangeInfo(context.Background())
result, err := e.GetExchangeInfo(t.Context())
require.NoError(t, err)
assert.NotNil(t, result)
```

View File

@@ -193,7 +193,7 @@ Run the following tool to check for Go modernise issues:
make modernise
```
Several other miscellaneous checks will be ran via [GitHub actions](/.github/workflows/misc.yml).
Several other miscellaneous checks will be run via [GitHub actions](/.github/workflows/misc.yml).
- All lint warnings and errors must be resolved before merging.
- Use `//nolint:linter-name` sparingly and always explain the reason in a comment next to the code.

View File

@@ -17,20 +17,20 @@ This currency_state_manager package is part of the GoCryptoTrader codebase.
You can track ideas, planned features and what's in progress on our [GoCryptoTrader Kanban board](https://github.com/orgs/thrasher-corp/projects/3).
Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader Slack](https://join.slack.com/t/gocryptotrader/shared_invite/zt-38z8abs3l-gH8AAOk8XND6DP5NfCiG_g)
## Current Features for Currency State Manager
+ The state manager keeps currency states up to date, which include:
* Withdrawal - Determines if the currency is allowed to be withdrawn from the exchange.
* Deposit - Determines if the currency is allowed to be deposited to an exchange.
* Trading - Determines if the currency is allowed to be traded on the exchange.
+ This allows for an internal state check to compliment internal and external
strategies.
## Current Features for Currency State Manager
+ The state manager keeps currency states up to date, which include:
* Withdrawal - Determines if the currency is allowed to be withdrawn from the exchange.
* Deposit - Determines if the currency is allowed to be deposited to an exchange.
* Trading - Determines if the currency is allowed to be traded on the exchange.
+ This allows for an internal state check to compliment internal and external
strategies.
## Donations
<img src="/docs/assets/donate.png" hspace="70">
If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:
***bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc***
***bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc***

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := b.Trade(...)
if err != nil {
// Handle error

View File

@@ -5,7 +5,7 @@
[![Build Status](https://github.com/thrasher-corp/gocryptotrader/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/thrasher-corp/gocryptotrader/actions/workflows/tests.yml)
[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/thrasher-corp/gocryptotrader/blob/master/LICENSE)
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader/exchanges/Coinbase)
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader/exchanges/coinbase)
[![Coverage Status](https://codecov.io/gh/thrasher-corp/gocryptotrader/graph/badge.svg?token=41784B23TS)](https://codecov.io/gh/thrasher-corp/gocryptotrader)
[![Go Report Card](https://goreportcard.com/badge/github.com/thrasher-corp/gocryptotrader)](https://goreportcard.com/report/github.com/thrasher-corp/gocryptotrader)
@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := c.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := c.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := d.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := e.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := g.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := g.Trade(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := h.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := h.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := k.Trade(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := l.Trade(...)
if err != nil {
// Handle error

View File

@@ -111,7 +111,7 @@ if err != nil {
// Private calls - make sure your APIKEY and APISECRET are set and
// AuthenticatedAPISupport is set to true
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
orderID, err := ok.SubmitOrder(...)
if err != nil {
// Handle error

View File

@@ -104,7 +104,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := p.PlaceOrder(...)
if err != nil {
// Handle error

View File

@@ -103,7 +103,7 @@ if err != nil {
// Handle error
}
// Submits an order and the exchange and returns its tradeID
// Submits an order to the exchange and returns its tradeID
tradeID, err := y.Trade("BTCUSD", "MARKET", 1, 2)
if err != nil {
// Handle error