https://github.com/narsil/gogox
MtGox Go API, Simplified compared to golang-mtgox
https://github.com/narsil/gogox
Last synced: 3 months ago
JSON representation
MtGox Go API, Simplified compared to golang-mtgox
- Host: GitHub
- URL: https://github.com/narsil/gogox
- Owner: Narsil
- License: mit
- Created: 2013-09-03T17:24:42.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-03T17:56:46.000Z (almost 12 years ago)
- Last Synced: 2025-01-24T00:31:52.539Z (5 months ago)
- Language: Go
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mtgox
An implementation of a Mt. Gox client in Go. It uses the [websocket interface](https://en.bitcoin.it/wiki/MtGox/API/Streaming).
_Note_: This API is experimental.
## Documentation
Example below. [API Documentation on Godoc](http://godoc.org/github.com/yanatan16/golang-mtgox).
## Example
```go
func ExampleStreamingApi() {
gox, err := NewFromConfig(os.ExpandEnv("$MTGOX_CONFIG"))
gox.Start()
if err != nil {
panic(err)
}tickers := gox.Ticker
if err != nil {
panic(err)
}go func() {
for ticker := range tickers {
fmt.Println("Got ticker", ticker)
}
}()orderchan := gox.SubmitOrder("bid", 100000000, 10000) // Both are in _int notation
order := <-orderchan
fmt.Println("Yay submitted an order!", order)
}
```## License
MIT found in LICENSE file.