Files
gocryptotrader/engine/rawr/rawr.go
Adrian Gallagher 051675255d CI: Add support for GitHub actions (#680)
* Add initial workflows config

* Add PSQL service

* Add 32bit and frontend jobs

* Add gcc-multilib and fix typo

* Fix backtester test for linux/unix filesystem errors and npm commands

* 32-bit Add -race to purposefully throw an error to ensure envs are set correctly (will revert)

* Revert "32-bit Add -race to purposefully throw an error to ensure envs are set correctly (will revert)"

This reverts commit b97e66c49fca859f8738e01107f96f9ca4040b2e.

* Bump workers count for orderbook processing

* Remove comments to trigger 32-bit cache hit after job success

* Cancel addition plus version bump, spawn more overlords

* Update build badge to Github Actions

* Brach -> Branch
2021-05-06 14:35:05 +10:00

35 lines
771 B
Go

package main
import (
"fmt"
"log"
"github.com/thrasher-corp/gocryptotrader/currency"
"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
"github.com/thrasher-corp/gocryptotrader/exchanges/okex"
"github.com/thrasher-corp/gocryptotrader/exchanges/order"
)
func main() {
var o okex.OKEX
o.SetDefaults()
o.API.Credentials.Key = "your_key"
o.API.Credentials.Secret = "your_secret"
o.API.Credentials.ClientID = "your_clientid"
ord := &order.Submit{
Pair: currency.NewPair(currency.BTC, currency.USDT),
Side: order.Buy,
Type: order.Limit,
Price: 50000,
Amount: 0.1,
AssetType: asset.Spot,
}
resp, err := o.SubmitOrder(ord)
if err != nil {
log.Printf("Unable to place order: %s", err)
}
fmt.Println(resp.OrderID)
}