bitmex-go
bitmex-go copied to clipboard
add test case
main test is too naive, add formal test case instead.
Hello, i run with main.go tests Good Job! but please let mek now how i can start live bitmex trading or it's need build my self? please let me know
@DaKoTaGeorgia No, you don't need to build yourself.
-
go get github.com/qct/bitmex-go
- import this repo like
main.go
:
import (
"github.com/qct/bitmex-go/restful"
"github.com/qct/bitmex-go/swagger"
"golang.org/x/net/context"
"io/ioutil"
"log"
)
- then you can do live bitmex trading like what did in
main.go
:
orderApi := restful.NewOrderApi(apiClient.OrderApi, auth)
resp, orderId, err := orderApi.LimitBuy("XBTUSD", 1.0, 13000, "qct_f_f_")
yes sorry for noob questions but i now working with simple-bitmex-bot and now i run go on my macbook i run this code good but only test results... i mean when i will run your bot it will trading automatical with included logic or i need write logic myself ?
in you code:
orderApi := restful.NewOrderApi(apiClient.OrderApi, auth) resp, orderId, err := orderApi.LimitBuy("XBTUSD", 1.0, 13000, "qct_f_f_")
bot placing 1 contract 13000$ (i mean how trade automatical...)
@DaKoTaGeorgia this repo is a SDK, not a strategy, you need to write your own logic code.