@liberfi.io/react-predict 0.3.37 → 0.3.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +38 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -35
- package/dist/index.mjs.map +1 -1
- package/dist/{server-DfzGla54.d.mts → server-Da_gQzNk.d.mts} +9 -3
- package/dist/{server-DfzGla54.d.ts → server-Da_gQzNk.d.ts} +9 -3
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +3 -3
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -153,9 +153,13 @@ interface OrderbookLevel {
|
|
|
153
153
|
price: number;
|
|
154
154
|
size: number;
|
|
155
155
|
}
|
|
156
|
+
/** Binary outcome side for per-outcome order books. */
|
|
157
|
+
type OrderbookOutcome = "yes" | "no";
|
|
156
158
|
/** Aggregated order book for a market. */
|
|
157
159
|
interface Orderbook {
|
|
158
160
|
market_id: string;
|
|
161
|
+
/** Outcome side this book belongs to. */
|
|
162
|
+
outcome?: OrderbookOutcome;
|
|
159
163
|
/** Sorted by price descending. */
|
|
160
164
|
bids: OrderbookLevel[];
|
|
161
165
|
/** Sorted by price ascending. */
|
|
@@ -859,6 +863,8 @@ type WsConnectionStatus = "connecting" | "connected" | "disconnected" | "reconne
|
|
|
859
863
|
*/
|
|
860
864
|
interface WsOrderbookEvent {
|
|
861
865
|
market_slug: string;
|
|
866
|
+
/** Outcome side this snapshot belongs to. */
|
|
867
|
+
outcome?: OrderbookOutcome;
|
|
862
868
|
bids: OrderbookLevel[];
|
|
863
869
|
asks: OrderbookLevel[];
|
|
864
870
|
spread?: number;
|
|
@@ -1063,8 +1069,8 @@ declare class PredictClient {
|
|
|
1063
1069
|
* @throws When the server responds with 404 or any other non-2xx status.
|
|
1064
1070
|
*/
|
|
1065
1071
|
getMarket(slug: string, source?: ProviderSource): Promise<PredictMarket>;
|
|
1066
|
-
/** Maps to `GET /api/v1/markets/:slug/orderbook?source=...`. */
|
|
1067
|
-
getOrderbook(slug: string, source: ProviderSource): Promise<Orderbook>;
|
|
1072
|
+
/** Maps to `GET /api/v1/markets/:slug/orderbook?source=...&outcome=...`. */
|
|
1073
|
+
getOrderbook(slug: string, source: ProviderSource, outcome?: OrderbookOutcome): Promise<Orderbook>;
|
|
1068
1074
|
/** Maps to `GET /api/v1/markets/:slug/trades?source=...`. */
|
|
1069
1075
|
listMarketTrades(slug: string, params: ListMarketTradesParams): Promise<PredictPage<PredictTrade>>;
|
|
1070
1076
|
/** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
|
|
@@ -1858,4 +1864,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
|
|
|
1858
1864
|
*/
|
|
1859
1865
|
declare function getPolymarketSharesPrecision(tickSize: string): number;
|
|
1860
1866
|
|
|
1861
|
-
export { type
|
|
1867
|
+
export { type TickSizeResponse as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type ListTradesMultiParams as D, type EventStats as E, type DFlowQuoteRequest as F, type DFlowQuoteResponse as G, type DFlowSubmitResponse as H, type DFlowSubmitRequest as I, type DFlowKYCStatus as J, type PolymarketSetupStatus as K, type ListEventsParams as L, type MatchesParams as M, type PolymarketDepositWalletDeployResponse as N, type OrderbookOutcome as O, PredictClient as P, type WithdrawBuildRequest as Q, type WithdrawSubmitResponse as R, type SimilarEventsParams as S, type WithdrawSubmitRequest as T, type WithdrawStatusResponse as U, type PolymarketDepositAddresses as V, type WithdrawBuildResponse as W, type PolymarketSupportedAsset as X, type PolymarketWithdrawResponse as Y, type PolymarketWithdrawRequest as Z, type PolymarketRedeemResponse as _, PredictWsClient as a, fetchEvent as a$, type FeeRateResponse as a0, type RebateConfig as a1, type WsConnectionStatus as a2, type WsDataMessage as a3, type WsPriceEvent as a4, type WsOrderbookEvent as a5, type WsTradeEvent as a6, type CreateOrderInput as a7, createPredictClient as a8, createPredictWsClient as a9, type PolymarketBridgeToken as aA, type PolymarketSupportedAssetsResponse as aB, type PolymarketWithdrawPrepareRequest as aC, type PolymarketWithdrawPrepareResponse as aD, type MatchStatus as aE, type MatchGroupEntry as aF, type MatchGroupMarket as aG, type MatchSortField as aH, type MatchesStats as aI, type MatchConfidenceTier as aJ, type SignalTag as aK, type MatchLeg as aL, type MatchMarketFlat as aM, type WsChannel as aN, type WsChannelEvent as aO, type WsClientMessage as aP, type WsSubscribeMessage as aQ, type WsPingMessage as aR, type WsServerMessage as aS, type WsPongMessage as aT, type WsSubscribedMessage as aU, type WsErrorCode as aV, type WsErrorMessage as aW, type PolymarketRedeemPrepareInput as aX, type PolymarketRedeemPrepareResponse as aY, type PolymarketRedeemInput as aZ, eventQueryKey as a_, type PredictWsClientConfig as aa, type ProviderMeta as ab, type PredictTag as ac, type SettlementSource as ad, type MarketStatus as ae, type MarketResult as af, type MarketOutcome as ag, type OrderbookLevel as ah, type TradeType as ai, type EventSummary as aj, type MarketSummary as ak, type PredictCommentProfile as al, type PricePoint as am, type PredictPosition as an, type OrderStatus as ao, type OrderSide as ap, type DFlowOrderContext as aq, type PolymarketOrderType as ar, type PolymarketWalletKind as as, type PolymarketDepositWalletDeployRequest as at, type DepositBuildRequest as au, type DepositBuildResponse as av, type DepositSubmitRequest as aw, type DepositSubmitResponse as ax, type DepositStatusResponse as ay, type UnsignedTx as az, type PredictPage as b, resolveTagSlug as b0, resolveEventsParams as b1, infiniteEventsQueryKey as b2, fetchEventsPage as b3, type ResolveEventsParamsInput as b4, type TagSlugSelection as b5, marketQueryKey as b6, fetchMarket as b7, matchesQueryKey as b8, matchQueryKey as b9, type BuildOrderMessageInput as bA, type OrderMessage as bB, type SignedOrder as bC, DEFAULT_PAGE_SIZE as bD, fetchMatchesPage as ba, matchMarketsQueryKey as bb, fetchMatchMarketsPage as bc, CLOB_AUTH_DOMAIN as bd, CLOB_AUTH_TYPES as be, buildClobAuthMessage as bf, hmacSha256Base64 as bg, buildPolymarketL2Headers as bh, derivePolymarketApiKey as bi, type HttpMethod as bj, type PolymarketL2HeadersInput as bk, type PolymarketL2Headers as bl, type BuildClobAuthMessageInput as bm, CTF_EXCHANGE_ADDRESS as bn, NEG_RISK_CTF_EXCHANGE_ADDRESS as bo, USDC_ADDRESS as bp, POLYGON_CHAIN_ID as bq, buildCtfExchangeDomain as br, CTF_ORDER_TYPES as bs, ORDER_TYPE as bt, SIDE as bu, buildOrderMessage as bv, buildSignedOrder as bw, buildClobPayload as bx, getPolymarketSharesPrecision as by, type ClobOrderPayload as bz, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type Orderbook as h, type ListMarketTradesParams as i, type PredictTrade as j, type PriceHistoryRange as k, type PriceHistoryResponse as l, type ListCandlesticksParams as m, type ListCommentsParams as n, type PredictComment as o, type PositionsResponse as p, type ListOrdersParams as q, type PredictOrder as r, type ListOrdersMultiParams as s, type PredictOrdersResponse as t, type CancelOrderResult as u, type MatchGroupPage as v, type MatchGroup as w, type MatchMarketParams as x, type MatchMarketPage as y, type ListTradesParams as z };
|
|
@@ -153,9 +153,13 @@ interface OrderbookLevel {
|
|
|
153
153
|
price: number;
|
|
154
154
|
size: number;
|
|
155
155
|
}
|
|
156
|
+
/** Binary outcome side for per-outcome order books. */
|
|
157
|
+
type OrderbookOutcome = "yes" | "no";
|
|
156
158
|
/** Aggregated order book for a market. */
|
|
157
159
|
interface Orderbook {
|
|
158
160
|
market_id: string;
|
|
161
|
+
/** Outcome side this book belongs to. */
|
|
162
|
+
outcome?: OrderbookOutcome;
|
|
159
163
|
/** Sorted by price descending. */
|
|
160
164
|
bids: OrderbookLevel[];
|
|
161
165
|
/** Sorted by price ascending. */
|
|
@@ -859,6 +863,8 @@ type WsConnectionStatus = "connecting" | "connected" | "disconnected" | "reconne
|
|
|
859
863
|
*/
|
|
860
864
|
interface WsOrderbookEvent {
|
|
861
865
|
market_slug: string;
|
|
866
|
+
/** Outcome side this snapshot belongs to. */
|
|
867
|
+
outcome?: OrderbookOutcome;
|
|
862
868
|
bids: OrderbookLevel[];
|
|
863
869
|
asks: OrderbookLevel[];
|
|
864
870
|
spread?: number;
|
|
@@ -1063,8 +1069,8 @@ declare class PredictClient {
|
|
|
1063
1069
|
* @throws When the server responds with 404 or any other non-2xx status.
|
|
1064
1070
|
*/
|
|
1065
1071
|
getMarket(slug: string, source?: ProviderSource): Promise<PredictMarket>;
|
|
1066
|
-
/** Maps to `GET /api/v1/markets/:slug/orderbook?source=...`. */
|
|
1067
|
-
getOrderbook(slug: string, source: ProviderSource): Promise<Orderbook>;
|
|
1072
|
+
/** Maps to `GET /api/v1/markets/:slug/orderbook?source=...&outcome=...`. */
|
|
1073
|
+
getOrderbook(slug: string, source: ProviderSource, outcome?: OrderbookOutcome): Promise<Orderbook>;
|
|
1068
1074
|
/** Maps to `GET /api/v1/markets/:slug/trades?source=...`. */
|
|
1069
1075
|
listMarketTrades(slug: string, params: ListMarketTradesParams): Promise<PredictPage<PredictTrade>>;
|
|
1070
1076
|
/** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
|
|
@@ -1858,4 +1864,4 @@ declare function buildClobPayload(signedOrder: SignedOrder, owner: string): Clob
|
|
|
1858
1864
|
*/
|
|
1859
1865
|
declare function getPolymarketSharesPrecision(tickSize: string): number;
|
|
1860
1866
|
|
|
1861
|
-
export { type
|
|
1867
|
+
export { type TickSizeResponse as $, type AvailableSharesResponse as A, type BalanceResponse as B, type Candlestick as C, type ListTradesMultiParams as D, type EventStats as E, type DFlowQuoteRequest as F, type DFlowQuoteResponse as G, type DFlowSubmitResponse as H, type DFlowSubmitRequest as I, type DFlowKYCStatus as J, type PolymarketSetupStatus as K, type ListEventsParams as L, type MatchesParams as M, type PolymarketDepositWalletDeployResponse as N, type OrderbookOutcome as O, PredictClient as P, type WithdrawBuildRequest as Q, type WithdrawSubmitResponse as R, type SimilarEventsParams as S, type WithdrawSubmitRequest as T, type WithdrawStatusResponse as U, type PolymarketDepositAddresses as V, type WithdrawBuildResponse as W, type PolymarketSupportedAsset as X, type PolymarketWithdrawResponse as Y, type PolymarketWithdrawRequest as Z, type PolymarketRedeemResponse as _, PredictWsClient as a, fetchEvent as a$, type FeeRateResponse as a0, type RebateConfig as a1, type WsConnectionStatus as a2, type WsDataMessage as a3, type WsPriceEvent as a4, type WsOrderbookEvent as a5, type WsTradeEvent as a6, type CreateOrderInput as a7, createPredictClient as a8, createPredictWsClient as a9, type PolymarketBridgeToken as aA, type PolymarketSupportedAssetsResponse as aB, type PolymarketWithdrawPrepareRequest as aC, type PolymarketWithdrawPrepareResponse as aD, type MatchStatus as aE, type MatchGroupEntry as aF, type MatchGroupMarket as aG, type MatchSortField as aH, type MatchesStats as aI, type MatchConfidenceTier as aJ, type SignalTag as aK, type MatchLeg as aL, type MatchMarketFlat as aM, type WsChannel as aN, type WsChannelEvent as aO, type WsClientMessage as aP, type WsSubscribeMessage as aQ, type WsPingMessage as aR, type WsServerMessage as aS, type WsPongMessage as aT, type WsSubscribedMessage as aU, type WsErrorCode as aV, type WsErrorMessage as aW, type PolymarketRedeemPrepareInput as aX, type PolymarketRedeemPrepareResponse as aY, type PolymarketRedeemInput as aZ, eventQueryKey as a_, type PredictWsClientConfig as aa, type ProviderMeta as ab, type PredictTag as ac, type SettlementSource as ad, type MarketStatus as ae, type MarketResult as af, type MarketOutcome as ag, type OrderbookLevel as ah, type TradeType as ai, type EventSummary as aj, type MarketSummary as ak, type PredictCommentProfile as al, type PricePoint as am, type PredictPosition as an, type OrderStatus as ao, type OrderSide as ap, type DFlowOrderContext as aq, type PolymarketOrderType as ar, type PolymarketWalletKind as as, type PolymarketDepositWalletDeployRequest as at, type DepositBuildRequest as au, type DepositBuildResponse as av, type DepositSubmitRequest as aw, type DepositSubmitResponse as ax, type DepositStatusResponse as ay, type UnsignedTx as az, type PredictPage as b, resolveTagSlug as b0, resolveEventsParams as b1, infiniteEventsQueryKey as b2, fetchEventsPage as b3, type ResolveEventsParamsInput as b4, type TagSlugSelection as b5, marketQueryKey as b6, fetchMarket as b7, matchesQueryKey as b8, matchQueryKey as b9, type BuildOrderMessageInput as bA, type OrderMessage as bB, type SignedOrder as bC, DEFAULT_PAGE_SIZE as bD, fetchMatchesPage as ba, matchMarketsQueryKey as bb, fetchMatchMarketsPage as bc, CLOB_AUTH_DOMAIN as bd, CLOB_AUTH_TYPES as be, buildClobAuthMessage as bf, hmacSha256Base64 as bg, buildPolymarketL2Headers as bh, derivePolymarketApiKey as bi, type HttpMethod as bj, type PolymarketL2HeadersInput as bk, type PolymarketL2Headers as bl, type BuildClobAuthMessageInput as bm, CTF_EXCHANGE_ADDRESS as bn, NEG_RISK_CTF_EXCHANGE_ADDRESS as bo, USDC_ADDRESS as bp, POLYGON_CHAIN_ID as bq, buildCtfExchangeDomain as br, CTF_ORDER_TYPES as bs, ORDER_TYPE as bt, SIDE as bu, buildOrderMessage as bv, buildSignedOrder as bw, buildClobPayload as bx, getPolymarketSharesPrecision as by, type ClobOrderPayload as bz, type PredictEvent as c, type ProviderSource as d, type EventStatus as e, type EventSortField as f, type PredictMarket as g, type Orderbook as h, type ListMarketTradesParams as i, type PredictTrade as j, type PriceHistoryRange as k, type PriceHistoryResponse as l, type ListCandlesticksParams as m, type ListCommentsParams as n, type PredictComment as o, type PositionsResponse as p, type ListOrdersParams as q, type PredictOrder as r, type ListOrdersMultiParams as s, type PredictOrdersResponse as t, type CancelOrderResult as u, type MatchGroupPage as v, type MatchGroup as w, type MatchMarketParams as x, type MatchMarketPage as y, type ListTradesParams as z };
|
package/dist/server.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BalanceResponse,
|
|
1
|
+
export { B as BalanceResponse, bm as BuildClobAuthMessageInput, bA as BuildOrderMessageInput, bd as CLOB_AUTH_DOMAIN, be as CLOB_AUTH_TYPES, bn as CTF_EXCHANGE_ADDRESS, bs as CTF_ORDER_TYPES, u as CancelOrderResult, C as Candlestick, bz as ClobOrderPayload, a7 as CreateOrderInput, bD as DEFAULT_PAGE_SIZE, aq as DFlowOrderContext, F as DFlowQuoteRequest, G as DFlowQuoteResponse, I as DFlowSubmitRequest, H as DFlowSubmitResponse, au as DepositBuildRequest, av as DepositBuildResponse, ay as DepositStatusResponse, aw as DepositSubmitRequest, ax as DepositSubmitResponse, f as EventSortField, e as EventStatus, aj as EventSummary, bj as HttpMethod, m as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, q as ListOrdersParams, z as ListTradesParams, ag as MarketOutcome, af as MarketResult, ae as MarketStatus, ak as MarketSummary, aJ as MatchConfidenceTier, w as MatchGroup, aF as MatchGroupEntry, aG as MatchGroupMarket, v as MatchGroupPage, aL as MatchLeg, aM as MatchMarketFlat, y as MatchMarketPage, x as MatchMarketParams, aH as MatchSortField, aE as MatchStatus, M as MatchesParams, aI as MatchesStats, bo as NEG_RISK_CTF_EXCHANGE_ADDRESS, bt as ORDER_TYPE, bB as OrderMessage, ap as OrderSide, ao as OrderStatus, h as Orderbook, ah as OrderbookLevel, bq as POLYGON_CHAIN_ID, bl as PolymarketL2Headers, bk as PolymarketL2HeadersInput, ar as PolymarketOrderType, p as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, r as PredictOrder, b as PredictPage, an as PredictPosition, ac as PredictTag, j as PredictTrade, a as PredictWsClient, aa as PredictWsClientConfig, k as PriceHistoryRange, l as PriceHistoryResponse, am as PricePoint, ab as ProviderMeta, d as ProviderSource, b4 as ResolveEventsParamsInput, bu as SIDE, ad as SettlementSource, aK as SignalTag, bC as SignedOrder, S as SimilarEventsParams, b5 as TagSlugSelection, ai as TradeType, bp as USDC_ADDRESS, az as UnsignedTx, aN as WsChannel, aO as WsChannelEvent, aP as WsClientMessage, a2 as WsConnectionStatus, a3 as WsDataMessage, aV as WsErrorCode, aW as WsErrorMessage, a5 as WsOrderbookEvent, aR as WsPingMessage, aT as WsPongMessage, a4 as WsPriceEvent, aS as WsServerMessage, aQ as WsSubscribeMessage, aU as WsSubscribedMessage, a6 as WsTradeEvent, bf as buildClobAuthMessage, bx as buildClobPayload, br as buildCtfExchangeDomain, bv as buildOrderMessage, bh as buildPolymarketL2Headers, bw as buildSignedOrder, a8 as createPredictClient, a9 as createPredictWsClient, bi as derivePolymarketApiKey, a_ as eventQueryKey, a$ as fetchEvent, b3 as fetchEventsPage, b7 as fetchMarket, bc as fetchMatchMarketsPage, ba as fetchMatchesPage, bg as hmacSha256Base64, b2 as infiniteEventsQueryKey, b6 as marketQueryKey, bb as matchMarketsQueryKey, b9 as matchQueryKey, b8 as matchesQueryKey, b1 as resolveEventsParams, b0 as resolveTagSlug } from './server-Da_gQzNk.mjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BalanceResponse,
|
|
1
|
+
export { B as BalanceResponse, bm as BuildClobAuthMessageInput, bA as BuildOrderMessageInput, bd as CLOB_AUTH_DOMAIN, be as CLOB_AUTH_TYPES, bn as CTF_EXCHANGE_ADDRESS, bs as CTF_ORDER_TYPES, u as CancelOrderResult, C as Candlestick, bz as ClobOrderPayload, a7 as CreateOrderInput, bD as DEFAULT_PAGE_SIZE, aq as DFlowOrderContext, F as DFlowQuoteRequest, G as DFlowQuoteResponse, I as DFlowSubmitRequest, H as DFlowSubmitResponse, au as DepositBuildRequest, av as DepositBuildResponse, ay as DepositStatusResponse, aw as DepositSubmitRequest, ax as DepositSubmitResponse, f as EventSortField, e as EventStatus, aj as EventSummary, bj as HttpMethod, m as ListCandlesticksParams, L as ListEventsParams, i as ListMarketTradesParams, q as ListOrdersParams, z as ListTradesParams, ag as MarketOutcome, af as MarketResult, ae as MarketStatus, ak as MarketSummary, aJ as MatchConfidenceTier, w as MatchGroup, aF as MatchGroupEntry, aG as MatchGroupMarket, v as MatchGroupPage, aL as MatchLeg, aM as MatchMarketFlat, y as MatchMarketPage, x as MatchMarketParams, aH as MatchSortField, aE as MatchStatus, M as MatchesParams, aI as MatchesStats, bo as NEG_RISK_CTF_EXCHANGE_ADDRESS, bt as ORDER_TYPE, bB as OrderMessage, ap as OrderSide, ao as OrderStatus, h as Orderbook, ah as OrderbookLevel, bq as POLYGON_CHAIN_ID, bl as PolymarketL2Headers, bk as PolymarketL2HeadersInput, ar as PolymarketOrderType, p as PositionsResponse, P as PredictClient, c as PredictEvent, g as PredictMarket, r as PredictOrder, b as PredictPage, an as PredictPosition, ac as PredictTag, j as PredictTrade, a as PredictWsClient, aa as PredictWsClientConfig, k as PriceHistoryRange, l as PriceHistoryResponse, am as PricePoint, ab as ProviderMeta, d as ProviderSource, b4 as ResolveEventsParamsInput, bu as SIDE, ad as SettlementSource, aK as SignalTag, bC as SignedOrder, S as SimilarEventsParams, b5 as TagSlugSelection, ai as TradeType, bp as USDC_ADDRESS, az as UnsignedTx, aN as WsChannel, aO as WsChannelEvent, aP as WsClientMessage, a2 as WsConnectionStatus, a3 as WsDataMessage, aV as WsErrorCode, aW as WsErrorMessage, a5 as WsOrderbookEvent, aR as WsPingMessage, aT as WsPongMessage, a4 as WsPriceEvent, aS as WsServerMessage, aQ as WsSubscribeMessage, aU as WsSubscribedMessage, a6 as WsTradeEvent, bf as buildClobAuthMessage, bx as buildClobPayload, br as buildCtfExchangeDomain, bv as buildOrderMessage, bh as buildPolymarketL2Headers, bw as buildSignedOrder, a8 as createPredictClient, a9 as createPredictWsClient, bi as derivePolymarketApiKey, a_ as eventQueryKey, a$ as fetchEvent, b3 as fetchEventsPage, b7 as fetchMarket, bc as fetchMatchMarketsPage, ba as fetchMatchesPage, bg as hmacSha256Base64, b2 as infiniteEventsQueryKey, b6 as marketQueryKey, bb as matchMarketsQueryKey, b9 as matchQueryKey, b8 as matchesQueryKey, b1 as resolveEventsParams, b0 as resolveTagSlug } from './server-Da_gQzNk.js';
|
package/dist/server.js
CHANGED
|
@@ -186,9 +186,9 @@ var PredictClient = class {
|
|
|
186
186
|
const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}${query}`;
|
|
187
187
|
return await utils.httpGet(url);
|
|
188
188
|
}
|
|
189
|
-
/** Maps to `GET /api/v1/markets/:slug/orderbook?source=...`. */
|
|
190
|
-
async getOrderbook(slug, source) {
|
|
191
|
-
const query = buildQuery({ source });
|
|
189
|
+
/** Maps to `GET /api/v1/markets/:slug/orderbook?source=...&outcome=...`. */
|
|
190
|
+
async getOrderbook(slug, source, outcome) {
|
|
191
|
+
const query = buildQuery({ source, outcome });
|
|
192
192
|
const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}/orderbook${query}`;
|
|
193
193
|
return await utils.httpGet(url);
|
|
194
194
|
}
|