Exchanges: Include format pair in wrapper functions and test for formatting issues via tool wrapper issues (#582)

* Adds formatting of pair within binance wrapper, adds return of error from cli.ShowCommmandHelp

* Add formatting function to submit order wrapper functions

* Remove superfluous functionality

* Updated exchange wrapper issues to create a disruptive pair to see which exchanges require attention, updates currency code generation and matching

* reinstated format check, fixed tests

* fixed niterinos

* fix test

* fix spelling mistake

* make html file more aesthetic

* Add missing format pairs

* add formatting to pair for BTC Markets func

* fix spelling
This commit is contained in:
Ryan O'Hara-Reid
2020-10-26 16:54:51 +11:00
committed by GitHub
parent 8a241c2efa
commit 220245c5a8
32 changed files with 429 additions and 199 deletions

View File

@@ -214,15 +214,17 @@ func (a *Alphapoint) GetExchangeHistory(p currency.Pair, assetType asset.Item, t
// SubmitOrder submits a new order and returns a true value when
// successfully submitted
func (a *Alphapoint) SubmitOrder(s *order.Submit) (order.SubmitResponse, error) {
if err := s.Validate(); err != nil {
return order.SubmitResponse{}, err
}
var submitOrderResponse order.SubmitResponse
if err := s.Validate(); err != nil {
return submitOrderResponse, err
}
response, err := a.CreateOrder(s.Pair.String(),
fPair, err := a.FormatExchangeCurrency(s.Pair, s.AssetType)
if err != nil {
return submitOrderResponse, err
}
response, err := a.CreateOrder(fPair.String(),
s.Side.String(),
s.Type.String(),
s.Amount,