Skip to content

Commit

Permalink
V5 get mark price kline (#82)
Browse files Browse the repository at this point in the history
* feat: implement

* test: integration

* test: unit

* docs: update

* fix comment

* docs
  • Loading branch information
hirokisan authored Feb 20, 2023
1 parent a128db9 commit f91242b
Show file tree
Hide file tree
Showing 5 changed files with 1,549 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ The following API endpoints have been implemented

#### Market

- `/v5/market/kline` Get Kline
- [`/v5/market/kline` Get Kline](https://bybit-exchange.github.io/docs/v5/market/kline)
- [`/v5/market/mark-price-kline` Get Mark Price Kline](https://bybit-exchange.github.io/docs/v5/market/mark-kline)

#### Position

Expand Down
15 changes: 15 additions & 0 deletions integrationtest/v5/market/market_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,18 @@ func TestGetKline(t *testing.T) {
testhelper.UpdateFile(t, goldenFilename, testhelper.ConvertToJSON(res.Result))
}
}

func TestGetMarkPriceKline(t *testing.T) {
client := bybit.NewTestClient()
res, err := client.V5().Market().GetMarkPriceKline(bybit.V5GetMarkPriceKlineParam{
Category: bybit.CategoryV5Linear,
Symbol: bybit.SymbolV5BTCUSDT,
Interval: bybit.IntervalD,
})
require.NoError(t, err)
{
goldenFilename := "./testdata/v5-market-get-mark-price-kline.json"
testhelper.Compare(t, goldenFilename, testhelper.ConvertToJSON(res.Result))
testhelper.UpdateFile(t, goldenFilename, testhelper.ConvertToJSON(res.Result))
}
}
Loading

0 comments on commit f91242b

Please sign in to comment.