Skip to content
This repository was archived by the owner on Oct 27, 2023. It is now read-only.

API wapper for api/trades#6

Open
lqiz wants to merge 1 commit into
binance-exchange:masterfrom
lqiz:master
Open

API wapper for api/trades#6
lqiz wants to merge 1 commit into
binance-exchange:masterfrom
lqiz:master

Conversation

@lqiz

@lqiz lqiz commented Jun 17, 2018

Copy link
Copy Markdown

GET /api/v1/trades
Get recent trades (up to last 500).

Comment thread service_market.go
res, err := as.request("GET", "api/v1/trades", params, false, false)
if err != nil {
return nil, err
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defer must be here!

defer res.Body.Close()

Comment thread service_market.go
return nil, errors.Wrap(err, "rawRecentTrades unmarshal failed")
}

var recentTrades []*RecentTrades

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recentTrades := make([]*RecentTrades, 0, len(rawRecentTrades))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants