Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/yanatan16/golang-mtgox

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/yanatan16/golang-mtgox

  • v0.0.0-20131108164318-c622919c9f44
  • Source
  • Go
  • Socket score

Version published
Created
Source

mtgox

An implementation of a Mt. Gox client in Go. It uses the websocket interface.

Note: This API mostly complete but untested in production.

Documentation

Example below. API Documentation on Godoc.

Example

func ExampleMtGoxApi() {
	gox, err := NewFromConfig(os.ExpandEnv("$MTGOX_CONFIG"))
	if err != nil {
		panic(err)
	}

	c, err := gox.Subscribe("ticker", "depth")
	if err != nil {
		panic(err)
	}

	go func() {
		for msg := range c {
			fmt.Println("Got ticker or depth:", msg)
		}
	}()

	orderchan, err := gox.SubmitOrder("bid", 100000000, 10000) // Both are in _int notation. Will add float later
	if err != nil {
		panic(err)
	}

	order := <- orderchan
	if order.Success {
		fmt.Println("Yay submitted an order!", order.Result)
	} else {
		fmt.Println("Boo. Failure!", order.Error)
	}
}

License

MIT found in LICENSE file.

FAQs

Package last updated on 08 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc