- Preparing search index...
- The search index is not available
sdk-v2
- getAssetWeight<C, MS>(pool: Data<C, C extends RpcContext<MS> ? RpcPool : never, C extends IndexerContext ? IndexedPool<C, MS> : never, MS>, _assetId: {
CategoricalOutcome: [MarketId, number];
} | {
ScalarOutcome: [MarketId, "Short" | "Long"];
} | {
Ztg: null;
} | {
PoolShare: number;
} | ZeitgeistPrimitivesAsset): IOption<Decimal>
-
Type Parameters
-
-
MS extends MetadataStorage<{
__meta: "markets";
categories: undefined | ({ name: string; img?: string | undefined; ticker?: string | undefined; color?: string | undefined; })[];
confidentialId: undefined | string;
description: string;
img: undefined | string;
question: string;
scalarType: undefined | "number" | "date";
slug: string;
tags: undefined | string[];
}, MS>
Parameters
-
-
_assetId: {
CategoricalOutcome: [MarketId, number];
} | {
ScalarOutcome: [MarketId, "Short" | "Long"];
} | {
Ztg: null;
} | {
PoolShare: number;
} | ZeitgeistPrimitivesAsset
Returns IOption<Decimal>
Get the weight of an asset in a pool by its AssetId.
Returns
O.IOption