Categorygithub.com/MixinNetwork/bitshares-go
modulepackage
0.0.0-20230203104543-eb85b0208345
Repository: https://github.com/mixinnetwork/bitshares-go.git
Documentation: pkg.go.dev

# README

MixinNetwork/bitshares-go

Go Report Card GoDoc Build Status

Golang RPC (via websockets) client library for Bitshares and OpenLedger in particular

Usage

import "github.com/MixinNetwork/bitshares-go"

Example

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()

Supported operations

  • Transfer
  • LimitOrderCreate
  • LimitOrderCancel

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

NewClient creates a new RPC client.

# Structs

No description provided by the author