From 9716e17dd4c390d64ba2c885badc7668a9a11bdc Mon Sep 17 00:00:00 2001 From: Samuel Reid <43227667+cranktakular@users.noreply.github.com> Date: Tue, 19 Aug 2025 17:47:11 +1000 Subject: [PATCH 1/2] Updating wrapper template, updating documentation, regenerating documentation --- CONTRIBUTORS | 24 ++++---- README.md | 32 +++++----- .../exchanges_templates/binance.tmpl | 2 +- .../exchanges_templates/binanceus.tmpl | 2 +- .../exchanges_templates/bitfinex.tmpl | 2 +- .../exchanges_templates/bitflyer.tmpl | 2 +- .../exchanges_templates/bithumb.tmpl | 2 +- .../exchanges_templates/bitmex.tmpl | 2 +- .../exchanges_templates/bitstamp.tmpl | 2 +- .../exchanges_templates/btcmarkets.tmpl | 2 +- .../exchanges_templates/btse.tmpl | 2 +- .../exchanges_templates/bybit.tmpl | 2 +- .../exchanges_templates/coinbasepro.tmpl | 2 +- .../exchanges_templates/coinut.tmpl | 2 +- .../exchanges_templates/deribit.tmpl | 2 +- .../exchanges_templates/exmo.tmpl | 2 +- .../exchanges_templates/gateio.tmpl | 2 +- .../exchanges_templates/gemini.tmpl | 2 +- .../exchanges_templates/hitbtc.tmpl | 2 +- .../exchanges_templates/huobi.tmpl | 2 +- .../exchanges_templates/kraken.tmpl | 2 +- .../exchanges_templates/lbank.tmpl | 2 +- .../exchanges_templates/okx.tmpl | 2 +- .../exchanges_templates/poloniex.tmpl | 2 +- .../exchanges_templates/yobit.tmpl | 2 +- cmd/exchange_template/wrapper.tmpl | 8 +-- docs/ADD_NEW_EXCHANGE.md | 59 +++++++------------ exchanges/binance/README.md | 2 +- exchanges/binanceus/README.md | 2 +- exchanges/bitfinex/README.md | 2 +- exchanges/bitflyer/README.md | 2 +- exchanges/bithumb/README.md | 2 +- exchanges/bitmex/README.md | 2 +- exchanges/bitstamp/README.md | 2 +- exchanges/btcmarkets/README.md | 2 +- exchanges/btse/README.md | 2 +- exchanges/bybit/README.md | 2 +- exchanges/coinbasepro/README.md | 2 +- exchanges/coinut/README.md | 2 +- exchanges/deribit/README.md | 2 +- exchanges/exmo/README.md | 2 +- exchanges/gateio/README.md | 2 +- exchanges/gemini/README.md | 2 +- exchanges/hitbtc/README.md | 2 +- exchanges/huobi/README.md | 2 +- exchanges/kraken/README.md | 2 +- exchanges/lbank/README.md | 2 +- exchanges/okx/README.md | 2 +- exchanges/poloniex/README.md | 2 +- exchanges/yobit/README.md | 2 +- 50 files changed, 101 insertions(+), 114 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e025dd3d33b..9216d71e6cb 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -17,18 +17,18 @@ ermalguni | https://github.com/ermalguni MadCozBadd | https://github.com/MadCozBadd 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 +marcofranssen | https://github.com/marcofranssen +geseq | https://github.com/geseq TaltaM | https://github.com/TaltaM cranktakular | https://github.com/cranktakular 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 +woshidama323 | https://github.com/woshidama323 +romanornr | https://github.com/romanornr +crackcomm | https://github.com/crackcomm mshogin | https://github.com/mshogin herenow | https://github.com/herenow tk42 | https://github.com/tk42 @@ -40,11 +40,12 @@ azhang | https://github.com/azhang andreygrehov | https://github.com/andreygrehov bretep | https://github.com/bretep Christian-Achilli | https://github.com/Christian-Achilli +MarkDzulko | https://github.com/MarkDzulko 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 +cornelk | https://github.com/cornelk +aidan-bailey | https://github.com/aidan-bailey +Polizo96 | https://github.com/Polizo96 cavapoo2 | https://github.com/cavapoo2 tongxiaofeng | https://github.com/tongxiaofeng tonywangcn | https://github.com/tonywangcn @@ -57,15 +58,15 @@ shoman4eg | https://github.com/shoman4eg cangqiaoyuzhuo | https://github.com/cangqiaoyuzhuo 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 phieudu241 | https://github.com/phieudu241 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 +yuhangcangqian | https://github.com/yuhangcangqian antonzhukov | https://github.com/antonzhukov blombard | https://github.com/blombard CodeLingoBot | https://github.com/CodeLingoBot @@ -89,5 +90,6 @@ 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 idoall | https://github.com/idoall starit | https://github.com/starit diff --git a/README.md b/README.md index 558d2fdc122..7b012226eff 100644 --- a/README.md +++ b/README.md @@ -150,11 +150,11 @@ 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 | +| [thrasher-](https://github.com/thrasher-) | 733 | +| [dependabot[bot]](https://github.com/apps/dependabot) | 391 | +| [shazbert](https://github.com/shazbert) | 377 | | [gloriousCode](https://github.com/gloriousCode) | 237 | -| [gbjk](https://github.com/gbjk) | 133 | +| [gbjk](https://github.com/gbjk) | 134 | | [dependabot-preview[bot]](https://github.com/apps/dependabot-preview) | 88 | | [xtda](https://github.com/xtda) | 47 | | [lrascao](https://github.com/lrascao) | 27 | @@ -167,18 +167,18 @@ Binaries will be published once the codebase reaches a stable condition. | [MadCozBadd](https://github.com/MadCozBadd) | 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 | +| [marcofranssen](https://github.com/marcofranssen) | 8 | +| [geseq](https://github.com/geseq) | 8 | | [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 | +| [Copilot](https://github.com/apps/copilot-swe-agent) | 4 | | [woshidama323](https://github.com/woshidama323) | 3 | -| [Copilot](https://github.com/apps/copilot-swe-agent) | 3 | +| [romanornr](https://github.com/romanornr) | 3 | +| [crackcomm](https://github.com/crackcomm) | 3 | | [mshogin](https://github.com/mshogin) | 2 | | [herenow](https://github.com/herenow) | 2 | | [tk42](https://github.com/tk42) | 2 | @@ -190,11 +190,12 @@ Binaries will be published once the codebase reaches a stable condition. | [andreygrehov](https://github.com/andreygrehov) | 2 | | [bretep](https://github.com/bretep) | 2 | | [Christian-Achilli](https://github.com/Christian-Achilli) | 2 | +| [MarkDzulko](https://github.com/MarkDzulko) | 2 | | [dsinuela-taurus](https://github.com/dsinuela-taurus) | 2 | -| [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 | +| [cornelk](https://github.com/cornelk) | 2 | +| [aidan-bailey](https://github.com/aidan-bailey) | 1 | +| [Polizo96](https://github.com/Polizo96) | 1 | | [cavapoo2](https://github.com/cavapoo2) | 1 | | [tongxiaofeng](https://github.com/tongxiaofeng) | 1 | | [tonywangcn](https://github.com/tonywangcn) | 1 | @@ -207,15 +208,15 @@ Binaries will be published once the codebase reaches a stable condition. | [cangqiaoyuzhuo](https://github.com/cangqiaoyuzhuo) | 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 | | [phieudu241](https://github.com/phieudu241) | 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 | +| [yuhangcangqian](https://github.com/yuhangcangqian) | 1 | | [antonzhukov](https://github.com/antonzhukov) | 1 | | [blombard](https://github.com/blombard) | 1 | | [CodeLingoBot](https://github.com/CodeLingoBot) | 1 | @@ -239,5 +240,6 @@ 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 | | [idoall](https://github.com/idoall) | 1 | | [starit](https://github.com/starit) | 1 | diff --git a/cmd/documentation/exchanges_templates/binance.tmpl b/cmd/documentation/exchanges_templates/binance.tmpl index b49748fa4a7..694af6866df 100644 --- a/cmd/documentation/exchanges_templates/binance.tmpl +++ b/cmd/documentation/exchanges_templates/binance.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/binanceus.tmpl b/cmd/documentation/exchanges_templates/binanceus.tmpl index 09b74c54e2b..3cd08af1cd8 100644 --- a/cmd/documentation/exchanges_templates/binanceus.tmpl +++ b/cmd/documentation/exchanges_templates/binanceus.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/bitfinex.tmpl b/cmd/documentation/exchanges_templates/bitfinex.tmpl index 623ce05c316..eb75420068a 100644 --- a/cmd/documentation/exchanges_templates/bitfinex.tmpl +++ b/cmd/documentation/exchanges_templates/bitfinex.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/bitflyer.tmpl b/cmd/documentation/exchanges_templates/bitflyer.tmpl index cd62d69b3e2..f4df082c60f 100644 --- a/cmd/documentation/exchanges_templates/bitflyer.tmpl +++ b/cmd/documentation/exchanges_templates/bitflyer.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/bithumb.tmpl b/cmd/documentation/exchanges_templates/bithumb.tmpl index 735c9599933..cbdce97550d 100644 --- a/cmd/documentation/exchanges_templates/bithumb.tmpl +++ b/cmd/documentation/exchanges_templates/bithumb.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/bitmex.tmpl b/cmd/documentation/exchanges_templates/bitmex.tmpl index e3c6c37234a..82df8803efb 100644 --- a/cmd/documentation/exchanges_templates/bitmex.tmpl +++ b/cmd/documentation/exchanges_templates/bitmex.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/bitstamp.tmpl b/cmd/documentation/exchanges_templates/bitstamp.tmpl index 0228e80acd3..1ac63df0b0b 100644 --- a/cmd/documentation/exchanges_templates/bitstamp.tmpl +++ b/cmd/documentation/exchanges_templates/bitstamp.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/btcmarkets.tmpl b/cmd/documentation/exchanges_templates/btcmarkets.tmpl index 9de83b08013..9524cd76a8b 100644 --- a/cmd/documentation/exchanges_templates/btcmarkets.tmpl +++ b/cmd/documentation/exchanges_templates/btcmarkets.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/btse.tmpl b/cmd/documentation/exchanges_templates/btse.tmpl index bf32464bed0..6b451aa4b79 100644 --- a/cmd/documentation/exchanges_templates/btse.tmpl +++ b/cmd/documentation/exchanges_templates/btse.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/bybit.tmpl b/cmd/documentation/exchanges_templates/bybit.tmpl index 50fec8af9c1..fbe13246f83 100644 --- a/cmd/documentation/exchanges_templates/bybit.tmpl +++ b/cmd/documentation/exchanges_templates/bybit.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/coinbasepro.tmpl b/cmd/documentation/exchanges_templates/coinbasepro.tmpl index 0cfcee9bdd4..4fa2eea17e8 100644 --- a/cmd/documentation/exchanges_templates/coinbasepro.tmpl +++ b/cmd/documentation/exchanges_templates/coinbasepro.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/coinut.tmpl b/cmd/documentation/exchanges_templates/coinut.tmpl index 053a551ead0..bd275bb23b6 100644 --- a/cmd/documentation/exchanges_templates/coinut.tmpl +++ b/cmd/documentation/exchanges_templates/coinut.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/deribit.tmpl b/cmd/documentation/exchanges_templates/deribit.tmpl index 63bfda4d884..0c65c5e36cf 100644 --- a/cmd/documentation/exchanges_templates/deribit.tmpl +++ b/cmd/documentation/exchanges_templates/deribit.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/exmo.tmpl b/cmd/documentation/exchanges_templates/exmo.tmpl index 5f2b635b877..3998783dc7b 100644 --- a/cmd/documentation/exchanges_templates/exmo.tmpl +++ b/cmd/documentation/exchanges_templates/exmo.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/gateio.tmpl b/cmd/documentation/exchanges_templates/gateio.tmpl index b050df742a4..23f9e882870 100644 --- a/cmd/documentation/exchanges_templates/gateio.tmpl +++ b/cmd/documentation/exchanges_templates/gateio.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/gemini.tmpl b/cmd/documentation/exchanges_templates/gemini.tmpl index 7d5c683f522..71a950faa03 100644 --- a/cmd/documentation/exchanges_templates/gemini.tmpl +++ b/cmd/documentation/exchanges_templates/gemini.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/hitbtc.tmpl b/cmd/documentation/exchanges_templates/hitbtc.tmpl index 312f0deaf8d..74b784b63fb 100644 --- a/cmd/documentation/exchanges_templates/hitbtc.tmpl +++ b/cmd/documentation/exchanges_templates/hitbtc.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/huobi.tmpl b/cmd/documentation/exchanges_templates/huobi.tmpl index 29743031354..de1c1e35604 100644 --- a/cmd/documentation/exchanges_templates/huobi.tmpl +++ b/cmd/documentation/exchanges_templates/huobi.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/kraken.tmpl b/cmd/documentation/exchanges_templates/kraken.tmpl index 73dd56bcb36..a194afa4565 100644 --- a/cmd/documentation/exchanges_templates/kraken.tmpl +++ b/cmd/documentation/exchanges_templates/kraken.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/lbank.tmpl b/cmd/documentation/exchanges_templates/lbank.tmpl index af3c30d5a4a..ec66aa31cf0 100644 --- a/cmd/documentation/exchanges_templates/lbank.tmpl +++ b/cmd/documentation/exchanges_templates/lbank.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/okx.tmpl b/cmd/documentation/exchanges_templates/okx.tmpl index 4f651e30b17..d30897234ab 100644 --- a/cmd/documentation/exchanges_templates/okx.tmpl +++ b/cmd/documentation/exchanges_templates/okx.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/poloniex.tmpl b/cmd/documentation/exchanges_templates/poloniex.tmpl index 2d7cf59f643..84179b59f30 100644 --- a/cmd/documentation/exchanges_templates/poloniex.tmpl +++ b/cmd/documentation/exchanges_templates/poloniex.tmpl @@ -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 diff --git a/cmd/documentation/exchanges_templates/yobit.tmpl b/cmd/documentation/exchanges_templates/yobit.tmpl index e1ba496b4a9..be368ecc903 100644 --- a/cmd/documentation/exchanges_templates/yobit.tmpl +++ b/cmd/documentation/exchanges_templates/yobit.tmpl @@ -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 diff --git a/cmd/exchange_template/wrapper.tmpl b/cmd/exchange_template/wrapper.tmpl index b47b6959ad6..02d9b783a9e 100644 --- a/cmd/exchange_template/wrapper.tmpl +++ b/cmd/exchange_template/wrapper.tmpl @@ -53,14 +53,14 @@ func (e *Exchange) SetDefaults() { fmt1 := currency.PairStore{ AssetEnabled: true, - RequestFormat: ¤cy.PairFormat{Uppercase: true}, - ConfigFormat: ¤cy.PairFormat{Uppercase: true}, + RequestFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "_"}, + ConfigFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "_"}, } fmt2 := currency.PairStore{ AssetEnabled: true, - RequestFormat: ¤cy.PairFormat{Uppercase: true}, - ConfigFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: ":"}, + RequestFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "-"}, + ConfigFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "_"}, } if err := e.SetAssetPairStore(asset.Spot, fmt1); err != nil { diff --git a/docs/ADD_NEW_EXCHANGE.md b/docs/ADD_NEW_EXCHANGE.md index e1497dee1b6..dd09a3bff22 100644 --- a/docs/ADD_NEW_EXCHANGE.md +++ b/docs/ADD_NEW_EXCHANGE.md @@ -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,43 +90,29 @@ 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: ¤cy.PairFormat{ - Uppercase: true, - Delimiter: "/", - }, - ConfigFormat: ¤cy.PairFormat{ - Uppercase: true, - Delimiter: "/", - }, - } - futures := currency.PairStore{ - AssetEnabled: true, - RequestFormat: ¤cy.PairFormat{ - Uppercase: true, - Delimiter: "-", - }, - ConfigFormat: ¤cy.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) - } - - err = e.SetAssetPairStore(asset.Futures, futures) - if err != nil { - log.Errorf(log.ExchangeSys, "%s error storing `futures` default asset formats: %s", bi.Name, err) - } + fmt1 := currency.PairStore{ + AssetEnabled: true, + RequestFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "_"}, + ConfigFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "_"}, + } + + fmt2 := currency.PairStore{ + AssetEnabled: true, + RequestFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "-"}, + ConfigFormat: ¤cy.PairFormat{Uppercase: true, Delimiter: "_"}, + } + + 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.Margin, fmt2); err != nil { + log.Errorf(log.ExchangeSys, "%s error storing %q default asset formats: %s", e.Name, asset.Margin, 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 exchange #### Add exchange to the [root README template](/cmd/documentation/root_templates/root_readme.tmpl) file @@ -319,7 +305,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 @@ -335,10 +321,7 @@ 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()) require.NoError(t, err) t.Log(result) diff --git a/exchanges/binance/README.md b/exchanges/binance/README.md index 78d3cdd52e9..362be7a0cd4 100644 --- a/exchanges/binance/README.md +++ b/exchanges/binance/README.md @@ -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 diff --git a/exchanges/binanceus/README.md b/exchanges/binanceus/README.md index ba52d6f4b66..81df4bc5534 100644 --- a/exchanges/binanceus/README.md +++ b/exchanges/binanceus/README.md @@ -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 diff --git a/exchanges/bitfinex/README.md b/exchanges/bitfinex/README.md index cf0ffeed700..3b691975a25 100644 --- a/exchanges/bitfinex/README.md +++ b/exchanges/bitfinex/README.md @@ -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 diff --git a/exchanges/bitflyer/README.md b/exchanges/bitflyer/README.md index 6f5a40e5892..0ca56efbaaf 100644 --- a/exchanges/bitflyer/README.md +++ b/exchanges/bitflyer/README.md @@ -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 diff --git a/exchanges/bithumb/README.md b/exchanges/bithumb/README.md index 3d113e53f92..1bf53ea87d4 100644 --- a/exchanges/bithumb/README.md +++ b/exchanges/bithumb/README.md @@ -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 diff --git a/exchanges/bitmex/README.md b/exchanges/bitmex/README.md index 345fff37fa3..069f0333710 100644 --- a/exchanges/bitmex/README.md +++ b/exchanges/bitmex/README.md @@ -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 diff --git a/exchanges/bitstamp/README.md b/exchanges/bitstamp/README.md index e77732e64e2..f9a91d3f23e 100644 --- a/exchanges/bitstamp/README.md +++ b/exchanges/bitstamp/README.md @@ -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 diff --git a/exchanges/btcmarkets/README.md b/exchanges/btcmarkets/README.md index 6b975e3dd9c..7a2cd0a9cc8 100644 --- a/exchanges/btcmarkets/README.md +++ b/exchanges/btcmarkets/README.md @@ -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 diff --git a/exchanges/btse/README.md b/exchanges/btse/README.md index a3f064e21b4..f554af4eb11 100644 --- a/exchanges/btse/README.md +++ b/exchanges/btse/README.md @@ -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 diff --git a/exchanges/bybit/README.md b/exchanges/bybit/README.md index c5840098dda..46fc9b352eb 100644 --- a/exchanges/bybit/README.md +++ b/exchanges/bybit/README.md @@ -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 diff --git a/exchanges/coinbasepro/README.md b/exchanges/coinbasepro/README.md index d810c868c80..b2a3ae9e8f6 100644 --- a/exchanges/coinbasepro/README.md +++ b/exchanges/coinbasepro/README.md @@ -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 diff --git a/exchanges/coinut/README.md b/exchanges/coinut/README.md index 56d16f31dc9..4a8047bd65d 100644 --- a/exchanges/coinut/README.md +++ b/exchanges/coinut/README.md @@ -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 diff --git a/exchanges/deribit/README.md b/exchanges/deribit/README.md index b7a4de10bf2..c6ca058976c 100644 --- a/exchanges/deribit/README.md +++ b/exchanges/deribit/README.md @@ -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 diff --git a/exchanges/exmo/README.md b/exchanges/exmo/README.md index 79002f479e6..58770dd7cad 100644 --- a/exchanges/exmo/README.md +++ b/exchanges/exmo/README.md @@ -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 diff --git a/exchanges/gateio/README.md b/exchanges/gateio/README.md index f17a40d7e6e..2f391ec12d3 100644 --- a/exchanges/gateio/README.md +++ b/exchanges/gateio/README.md @@ -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 diff --git a/exchanges/gemini/README.md b/exchanges/gemini/README.md index f706bc7c77f..5adbd270f84 100644 --- a/exchanges/gemini/README.md +++ b/exchanges/gemini/README.md @@ -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 diff --git a/exchanges/hitbtc/README.md b/exchanges/hitbtc/README.md index b45e82d81f9..7ff6905b8db 100644 --- a/exchanges/hitbtc/README.md +++ b/exchanges/hitbtc/README.md @@ -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 diff --git a/exchanges/huobi/README.md b/exchanges/huobi/README.md index 358d044436c..db74ccd2f1a 100644 --- a/exchanges/huobi/README.md +++ b/exchanges/huobi/README.md @@ -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 diff --git a/exchanges/kraken/README.md b/exchanges/kraken/README.md index 6e6edce0662..55e4595145e 100644 --- a/exchanges/kraken/README.md +++ b/exchanges/kraken/README.md @@ -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 diff --git a/exchanges/lbank/README.md b/exchanges/lbank/README.md index 99579ad54b7..27493a71710 100644 --- a/exchanges/lbank/README.md +++ b/exchanges/lbank/README.md @@ -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 diff --git a/exchanges/okx/README.md b/exchanges/okx/README.md index efce779f539..a8bc67dfd4d 100644 --- a/exchanges/okx/README.md +++ b/exchanges/okx/README.md @@ -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 diff --git a/exchanges/poloniex/README.md b/exchanges/poloniex/README.md index 8b2f3cba239..b4e1d9409ba 100644 --- a/exchanges/poloniex/README.md +++ b/exchanges/poloniex/README.md @@ -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 diff --git a/exchanges/yobit/README.md b/exchanges/yobit/README.md index 0e76e77af13..96200bd6b69 100644 --- a/exchanges/yobit/README.md +++ b/exchanges/yobit/README.md @@ -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 From b24be6025dd127d3067a06a22ed03e47db8092fb Mon Sep 17 00:00:00 2001 From: Samuel Reid <43227667+cranktakular@users.noreply.github.com> Date: Tue, 19 Aug 2025 18:00:22 +1000 Subject: [PATCH 2/2] Renaming "streaming api" to "websocket" --- README.md | 2 +- cmd/documentation/root_templates/root_readme.tmpl | 2 +- docs/ADD_NEW_EXCHANGE.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7b012226eff..70ceaee95b6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ 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 | FIX API | |----------|------|-----------|-----| | Binance.US| Yes | Yes | NA | | Binance| Yes | Yes | NA | diff --git a/cmd/documentation/root_templates/root_readme.tmpl b/cmd/documentation/root_templates/root_readme.tmpl index 438e0307dca..f9e1f58a186 100644 --- a/cmd/documentation/root_templates/root_readme.tmpl +++ b/cmd/documentation/root_templates/root_readme.tmpl @@ -17,7 +17,7 @@ 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 | FIX API | |----------|------|-----------|-----| | Binance.US| Yes | Yes | NA | | Binance| Yes | Yes | NA | diff --git a/docs/ADD_NEW_EXCHANGE.md b/docs/ADD_NEW_EXCHANGE.md index dd09a3bff22..de7554f968f 100644 --- a/docs/ADD_NEW_EXCHANGE.md +++ b/docs/ADD_NEW_EXCHANGE.md @@ -117,7 +117,7 @@ Similar to the configs, spot support is inbuilt but other asset types will need #### 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 | FIX API | |----------|------|-----------|-----| | Binance| Yes | Yes | NA | // <-------- new exchange | Bitfinex | Yes | Yes | NA |