cfxdb.xbr.market

Classes

IndexMarketsByActor

Markets-by-actor index with (actor_adr|bytes[20], joined|int) -> market_id|UUID mapping.

IndexMarketsByMaker

Markets-by-maker index with maker_adr|bytes[20] -> market_id|UUID mapping.

IndexMarketsByOwner

Markets-by-owner index with (owner_adr|bytes[20], created|int) -> market_id|UUID mapping.

Market

XBRNetwork.Market database object.

Markets

Markets table, mapping from market_id|UUID to cfxdb.xbr.Market

_MarketGen

Expand methods on the class code generated by flatc.

Module Contents

class IndexMarketsByActor(slot=None, compress=None)[source]

Bases: zlmdb.MapBytes20TimestampUuid

Markets-by-actor index with (actor_adr|bytes[20], joined|int) -> market_id|UUID mapping.

class IndexMarketsByMaker(slot=None, compress=None)[source]

Bases: zlmdb.MapBytes20Uuid

Markets-by-maker index with maker_adr|bytes[20] -> market_id|UUID mapping.

class IndexMarketsByOwner(slot=None, compress=None)[source]

Bases: zlmdb.MapBytes20TimestampUuid

Markets-by-owner index with (owner_adr|bytes[20], created|int) -> market_id|UUID mapping.

class Market(from_fbs=None)[source]

Bases: object

XBRNetwork.Market database object.

__str__()[source]
_coin = None[source]
_consumer_security = None[source]
_created = None[source]
_from_fbs = None[source]
_maker = None[source]
_market = None[source]
_market_fee = None[source]
_meta = None[source]
_owner = None[source]
_provider_security = None[source]
_seq = None[source]
_signature = None[source]
_terms = None[source]
_tid = None[source]
_timestamp = None[source]
build(builder)[source]
static cast(buf)[source]
property coin: bytes[source]

Market coin.

property consumer_security: int[source]

The amount of XBR tokens a XBR consumer joining the market must deposit.

property created: int[source]

Block number (on the blockchain) when the actor (originally) joined the market.

property maker: bytes[source]

The address of the XBR market maker that will run this market. The delegate of the market owner.

property market: uuid.UUID[source]

The unique ID of the market.

property market_fee: int[source]

The fee taken by the market (beneficiary is the market owner). The fee is a percentage of the revenue of the XBR Provider that receives XBR Token paid for transactions. The fee must be between 0% (inclusive) and 99% (inclusive), and is expressed as a fraction of the total supply of XBR tokens.

marshal() dict[source]
property meta: str[source]

The XBR market metadata published by the market owner. IPFS Multihash pointing to a RDF/Turtle file with market metadata.

property owner: bytes[source]

Market owner.

property provider_security: int[source]

The amount of XBR tokens a XBR provider joining the market must deposit.

property seq: int[source]

Global market sequence number.

property signature: bytes[source]

When signed off-chain and submitted via XBRMarket.createMarketFor.

property terms: str[source]

The XBR market terms set by the market owner. IPFS Multihash pointing to a ZIP archive file with market documents.

property tid: bytes[source]

Transaction hash of the transaction this change was committed to the blockchain under.

property timestamp: numpy.datetime64[source]

Database transaction time (epoch time in ns) of insert or last update.

class Markets(slot=None, compress=None, build=None, cast=None)[source]

Bases: zlmdb.MapUuidFlatBuffers

Markets table, mapping from market_id|UUID to cfxdb.xbr.Market

class _MarketGen[source]

Bases: cfxdb.gen.xbr.Market.Market

Expand methods on the class code generated by flatc.

FIXME: come up with a PR for flatc to generated this stuff automatically.

CoinAsBytes()[source]
ConsumerSecurityAsBytes()[source]
CreatedAsBytes()[source]
classmethod GetRootAsMarket(buf, offset)[source]

This method is deprecated. Please switch to GetRootAs.

MakerAsBytes()[source]
MarketAsBytes()[source]
MarketFeeAsBytes()[source]
OwnerAsBytes()[source]
ProviderSecurityAsBytes()[source]
SignatureAsBytes()[source]
TidAsBytes()[source]