From 7d79bcdf88bd742e529aa382e3cb68227a3e101a Mon Sep 17 00:00:00 2001 From: Frank Zhou <529808348@qq.com> Date: Fri, 24 Apr 2020 19:36:07 +0800 Subject: [PATCH] Update --- client_test.go | 16 ++++++++++++++++ go.sum | 1 + 2 files changed, 17 insertions(+) diff --git a/client_test.go b/client_test.go index 4deac61..231d0ea 100644 --- a/client_test.go +++ b/client_test.go @@ -103,6 +103,22 @@ func TestClient_GetPosition(t *testing.T) { t.Logf("%#v", result) } +func TestClient_BuyMarket(t *testing.T) { + client := newClient() + params := &models.BuyParams{ + InstrumentName: "BTC-PERPETUAL", + Amount: 10, + Price: 0, + Type: "market", + } + result, err := client.Buy(params) + if err != nil { + t.Error(err) + return + } + t.Logf("%#v", result) +} + func TestClient_Buy(t *testing.T) { client := newClient() params := &models.BuyParams{ diff --git a/go.sum b/go.sum index 78c8723..daca06d 100644 --- a/go.sum +++ b/go.sum @@ -32,6 +32,7 @@ github.com/sourcegraph/jsonrpc2 v0.0.0-20191222043438-96c4efab7ee2/go.mod h1:Zaf github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/sumorf/deribit-api v0.0.0-20191024014042-05ddd1385bf2/go.mod h1:5bdqVP0ePpCpfy1whSPwvUTwwWyXBjLjD87s3iq3QK4= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=