Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scorum/bitshares-go
Bitshares golang client
https://github.com/scorum/bitshares-go
bitshares blockchain openledger
Last synced: about 2 months ago
JSON representation
Bitshares golang client
- Host: GitHub
- URL: https://github.com/scorum/bitshares-go
- Owner: scorum
- License: mit
- Created: 2018-05-04T13:16:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-26T14:57:54.000Z (over 6 years ago)
- Last Synced: 2024-08-04T03:03:03.699Z (5 months ago)
- Topics: bitshares, blockchain, openledger
- Language: Go
- Homepage:
- Size: 73.2 KB
- Stars: 17
- Watchers: 9
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bitshares - bitshares-go - BitShares golang client (Libraries / Go Libraries)
README
# scorum/bitshares-go
[![Go Report Card](https://goreportcard.com/badge/github.com/scorum/bitshares-go)](https://goreportcard.com/report/github.com/scorum/bitshares-go)
[![GoDoc](https://godoc.org/github.com/scorum/bitshares-go?status.svg)](https://godoc.org/github.com/scorum/bitshares-go)
[![Build Status](https://travis-ci.org/scorum/bitshares-go.svg?branch=master)](https://travis-ci.org/scorum/bitshares-go)Golang RPC (via websockets) client library for [Bitshares](https://bitshares.org/) and [OpenLedger](https://openledger.io) in particular
## Usage
```go
import "github.com/scorum/bitshares-go"
```## Example
```go
client, err := NewClient("wss://bitshares.openledger.info/ws")// retrieve the current global_property_object
props, err := client.Database.GetDynamicGlobalProperties()// lookup symbols ids
symbols, err := client.Database.LookupAssetSymbols("OPEN.SCR", "USD")
require.NoError(t, err)openSCR := symbols[0].ID
USD := symbols[1].ID// retrieve 5 last filled orders
orders, err := client.History.GetFillOrderHistory(openSCR, USD, 5)// set a block applied callback
client.Database.SetBlockAppliedCallback(func(blockID string, err error) {
log.Println(blockID)
})// cancel all callbacks
client.Database.CancelAllSubscriptions()```
## Status
The project is in active development but should not be used in production yet.## Supported operations
- Transfer
- LimitOrderCreate
- LimitOrderCancel