GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nntaoli-project/goex: Cryptocurrency Exchange REST API SDK Wrapper Implemented With the golang, Supporting OKX, Binance

BranchesTags
Open more actions menu

Latest commit

 

History

1,061 Commits
1,061 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
binance
binance
 
 
bitget
bitget
 
 
httpcli
httpcli
 
 
logger
logger
 
 
model
model
 
 
okx
okx
 
 
options
options
 
 
util
util
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
_config.yml
_config.yml
 
 
api.go
api.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
goex_struct.png
goex_struct.png
 
 
main.go
main.go
 
 

Repository files navigation

Introduction

  • Unified and standardize the interfaces of various cryptocurrency trading platforms.
  • Support Exchanges List [ OKX,Binance ]

goex

Donate

  • [BTC] 1GoEXwVvXG7kNdQSFaUNF35A3izHojLGxP
  • [USDT-TRC20] TGoExC6xvzE4wSA9cYZnwcPaXEjibA5Vtc

Example

package main

import (
	goexv2 "github.com/nntaoli-project/goex/v2"
	"github.com/nntaoli-project/goex/v2/logger"
	"github.com/nntaoli-project/goex/v2/model"
	"github.com/nntaoli-project/goex/v2/options"
	"log"
)

func main() {
	logger.SetLevel(logger.DEBUG)                             // set log level
	//goexv2.DefaultHttpCli.SetProxy("socks5://127.0.0.1:1080") //socks5 proxy
	goexv2.DefaultHttpCli.SetTimeout(5)                       // 5 second

	_, _, err := goexv2.OKx.Spot.GetExchangeInfo() //must call
	if err != nil {
		panic(err)
	}
	
	//This CurrencyPair structure contains various information about the trading pair, such as price_precision and qty_precision,min_qty ...
	btcUSDTCurrencyPair, err := goexv2.OKx.Spot.NewCurrencyPair(model.BTC, model.USDT)
	if err != nil {
		panic(err)
	}
		
	//public api
	log.Println(goexv2.OKx.Spot.GetTicker(btcUSDTCurrencyPair))

	//private api
	okxPrvApi := goexv2.OKx.Spot.NewPrvApi(
		options.WithApiKey(""), 
		options.WithApiSecretKey(""), 
		options.WithPassphrase(""))
	
	//create order api
	order, _, err := okxPrvApi.CreateOrder(btcUSDTCurrencyPair, 0.01, 18000, model.Spot_Buy, model.OrderType_Limit)
	log.Println(err)
	log.Println(order)
}

FAQ

1. okx simulated trading

See (issues/238)

2. Filled The OrderClientID

ord, resp, err := okxPrvApi.CreateOrder(btcUSDTCurrencyPair, 0.01, 23000,
		model.Spot_Buy, model.OrderType_Limit,
		model.OptionParameter{}.OrderClientID("goex123027892")) //client id: goex123027892

Thanks

JetBrains

About

Cryptocurrency Exchange REST API SDK Wrapper Implemented With the golang, Supporting OKX, Binance

nntaoli-project.github.io/goex/

Topics

api-restbinanceokxquant

Resources

Readme
MIT license
Activity
Custom properties

Stars

2.0k stars

Watchers

94 watching

Forks

648 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.