@skinpricer/sdk 0.1.0 → 0.2.0
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/CHANGELOG.md +6 -0
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/package.json +19 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @skinpricer/sdk
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 37a3bb0: Add `executionAdjusted` to the NBBO response (`client.nbbo.get()`): fee- and executability-adjusted best bid/ask (`price`, `rawPrice`, `appliedFeeBps`, `withdrawalFlatUsdCents`, `executability`, `reasons`) plus `spreadBps`, `locked`, `crossed`, `executableConfidence`, `reasons`, and `feeModelVersion`. Adds exported types `ExecutionAdjustedNbbo` and `ExecutionAdjustedBestPrice`.
|
|
8
|
+
|
|
3
9
|
## 0.1.0
|
|
4
10
|
|
|
5
11
|
Initial release.
|
package/dist/index.d.cts
CHANGED
|
@@ -712,6 +712,30 @@ interface NbboParams {
|
|
|
712
712
|
marketHashName?: string;
|
|
713
713
|
markets?: KnownMarket[];
|
|
714
714
|
}
|
|
715
|
+
/** Fee-aware, executability-ranked best price for one side. Ask `price` is the total a buyer pays; bid `price` is the net a seller receives after fees. */
|
|
716
|
+
interface ExecutionAdjustedBestPrice {
|
|
717
|
+
market: string;
|
|
718
|
+
price: Cents;
|
|
719
|
+
rawPrice: Cents;
|
|
720
|
+
appliedFeeBps: number;
|
|
721
|
+
withdrawalFlatUsdCents?: Cents;
|
|
722
|
+
executability: number;
|
|
723
|
+
updatedAt: IsoDateString;
|
|
724
|
+
isStale: boolean;
|
|
725
|
+
reasons: string[];
|
|
726
|
+
}
|
|
727
|
+
/** Execution-adjusted NBBO block: fee-aware best bid/ask re-ranked by executability. */
|
|
728
|
+
interface ExecutionAdjustedNbbo {
|
|
729
|
+
bestAsk: ExecutionAdjustedBestPrice | null;
|
|
730
|
+
bestBid: ExecutionAdjustedBestPrice | null;
|
|
731
|
+
spreadBps: number | null;
|
|
732
|
+
locked: boolean;
|
|
733
|
+
crossed: boolean;
|
|
734
|
+
executableConfidence: number;
|
|
735
|
+
reasons: string[];
|
|
736
|
+
feeModelVersion: string;
|
|
737
|
+
calculatedAt: IsoDateString;
|
|
738
|
+
}
|
|
715
739
|
/** `GET /v1/nbbo` (camelCase). */
|
|
716
740
|
interface NbboResponse {
|
|
717
741
|
marketHashName: string;
|
|
@@ -725,6 +749,8 @@ interface NbboResponse {
|
|
|
725
749
|
crossed: boolean;
|
|
726
750
|
confidence: number;
|
|
727
751
|
calculatedAt: IsoDateString;
|
|
752
|
+
/** Execution-adjusted "real best market"; null when no quotes. */
|
|
753
|
+
executionAdjusted: ExecutionAdjustedNbbo | null;
|
|
728
754
|
}
|
|
729
755
|
interface NbboDepthParams extends NbboParams {
|
|
730
756
|
/** Aggregated depth levels per side (1–50, default 10). */
|
|
@@ -944,4 +970,4 @@ declare function mapWithConcurrency<T, R>(items: readonly T[], limit: number, fn
|
|
|
944
970
|
|
|
945
971
|
declare const VERSION = "0.1.0";
|
|
946
972
|
|
|
947
|
-
export { APIError, ATTRIBUTE_MARKETS, type AggregatePriceData, type AggregationsBatchParams, type AggregationsParams, AggregationsResource, type AllItemsItem, type AllItemsLatestPrice, type AllItemsPriceAggregates, type AllItemsResponse, type ArbitrageFreshness, type ArbitrageOpportunitiesResponse, type ArbitrageOpportunity, type ArbitrageParams, type ArbitrageQuote, ArbitrageResource, type ArbitrageSort, type AttributeBucketDimensions, type AttributeGranularity, type AttributeHistoryBucket, type AttributeHistoryItem, type AttributeHistoryParams, type AttributeHistoryPoint, type AttributeHistoryResponse, type AttributeLatestParams, type AttributeLatestResponse, type AttributeMarket, type AttributePriceBucket, type AttributePriceItem, AttributePricesResource, type AttributeRangeDimension, type AttributeType, type AuthScheme, AuthenticationError, BaseResource, type BestPrice, type Buff163AttributeHistoryResponse, type Buff163AttributeLatestResponse, type Buff163HistoryParams, type Buff163LatestParams, Buff163Resource, type Cents, type ClientConfig, type ClientHooks, ConfigurationError, type CurrentPriceParams, type CurrentPriceResponse, DEFAULT_BASE_URL, DEFAULT_RETRY, DEFAULT_TIMEOUT_MS, type ErrorResponseInput, FeatureNotAvailableError, type FormatUsdOptions, type FreshnessResponse, type HistoryListingType, type HistoryListingTypeInput, HistoryResource, type IsoDateString, type ItemMaxOrders, type ItemMinPrices, type ItemPriceListResponse, type ItemSearchParams, ItemsResource, KNOWN_MARKETS, type KnownMarket, type MarketAnalyticsParams, type MarketAnalyticsPoint, MarketAnalyticsResource, type MarketAnalyticsResponse, type MarketFreshness, type MarketHealthStatus, type MarketLatency, type MarketLatencyResponse, type MarketMaxOrder, type MarketMinPrice, type MarketPricePoint, type MarketSeries, type MaxOrdersResponse, type MinPricesResponse, type NbboBestPrice, type NbboDepthLevel, type NbboDepthParams, type NbboDepthQuote, type NbboDepthResponse, type NbboParams, NbboResource, type NbboResponse, NetworkError, NotFoundError, type PaginationMeta, ParseError, PermissionError, type PriceHistoryByMarketResponse, type PriceHistoryInterval, type PriceHistoryParams, type PriceHistoryPoint, type PriceHistoryResponse, type PricingListing, type PricingListingFloatCoverage, type PricingListingFloatSummary, type PricingListingObservedFloatSource, type PricingListingsParams, type PricingListingsResponse, PricingResource, RESPONSE_META, RateLimitError, type RateLimitErrorOptions, type RateLimitInfo, type RateLimitWindow, type RecommendationParams, type RecommendationResponse, RecommendationsResource, type RequestHookContext, type RequestOptions, type ResolvedConfig, type ResponseHookContext, type ResponseMeta, type RetryConfig, type RetryHookContext, type SalesHistoryWindow, ServerError, SkinpricerClient, SkinpricerError, type SkinpricerErrorOptions, StatusResource, TimeoutError, VERSION, ValidationError, type ValidationErrorOptions, type WithMeta, centsToUsd, chunk, errorFromResponse, formatUsd, getMeta, mapWithConcurrency, parseIsoDate, resolveConfig };
|
|
973
|
+
export { APIError, ATTRIBUTE_MARKETS, type AggregatePriceData, type AggregationsBatchParams, type AggregationsParams, AggregationsResource, type AllItemsItem, type AllItemsLatestPrice, type AllItemsPriceAggregates, type AllItemsResponse, type ArbitrageFreshness, type ArbitrageOpportunitiesResponse, type ArbitrageOpportunity, type ArbitrageParams, type ArbitrageQuote, ArbitrageResource, type ArbitrageSort, type AttributeBucketDimensions, type AttributeGranularity, type AttributeHistoryBucket, type AttributeHistoryItem, type AttributeHistoryParams, type AttributeHistoryPoint, type AttributeHistoryResponse, type AttributeLatestParams, type AttributeLatestResponse, type AttributeMarket, type AttributePriceBucket, type AttributePriceItem, AttributePricesResource, type AttributeRangeDimension, type AttributeType, type AuthScheme, AuthenticationError, BaseResource, type BestPrice, type Buff163AttributeHistoryResponse, type Buff163AttributeLatestResponse, type Buff163HistoryParams, type Buff163LatestParams, Buff163Resource, type Cents, type ClientConfig, type ClientHooks, ConfigurationError, type CurrentPriceParams, type CurrentPriceResponse, DEFAULT_BASE_URL, DEFAULT_RETRY, DEFAULT_TIMEOUT_MS, type ErrorResponseInput, type ExecutionAdjustedBestPrice, type ExecutionAdjustedNbbo, FeatureNotAvailableError, type FormatUsdOptions, type FreshnessResponse, type HistoryListingType, type HistoryListingTypeInput, HistoryResource, type IsoDateString, type ItemMaxOrders, type ItemMinPrices, type ItemPriceListResponse, type ItemSearchParams, ItemsResource, KNOWN_MARKETS, type KnownMarket, type MarketAnalyticsParams, type MarketAnalyticsPoint, MarketAnalyticsResource, type MarketAnalyticsResponse, type MarketFreshness, type MarketHealthStatus, type MarketLatency, type MarketLatencyResponse, type MarketMaxOrder, type MarketMinPrice, type MarketPricePoint, type MarketSeries, type MaxOrdersResponse, type MinPricesResponse, type NbboBestPrice, type NbboDepthLevel, type NbboDepthParams, type NbboDepthQuote, type NbboDepthResponse, type NbboParams, NbboResource, type NbboResponse, NetworkError, NotFoundError, type PaginationMeta, ParseError, PermissionError, type PriceHistoryByMarketResponse, type PriceHistoryInterval, type PriceHistoryParams, type PriceHistoryPoint, type PriceHistoryResponse, type PricingListing, type PricingListingFloatCoverage, type PricingListingFloatSummary, type PricingListingObservedFloatSource, type PricingListingsParams, type PricingListingsResponse, PricingResource, RESPONSE_META, RateLimitError, type RateLimitErrorOptions, type RateLimitInfo, type RateLimitWindow, type RecommendationParams, type RecommendationResponse, RecommendationsResource, type RequestHookContext, type RequestOptions, type ResolvedConfig, type ResponseHookContext, type ResponseMeta, type RetryConfig, type RetryHookContext, type SalesHistoryWindow, ServerError, SkinpricerClient, SkinpricerError, type SkinpricerErrorOptions, StatusResource, TimeoutError, VERSION, ValidationError, type ValidationErrorOptions, type WithMeta, centsToUsd, chunk, errorFromResponse, formatUsd, getMeta, mapWithConcurrency, parseIsoDate, resolveConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -712,6 +712,30 @@ interface NbboParams {
|
|
|
712
712
|
marketHashName?: string;
|
|
713
713
|
markets?: KnownMarket[];
|
|
714
714
|
}
|
|
715
|
+
/** Fee-aware, executability-ranked best price for one side. Ask `price` is the total a buyer pays; bid `price` is the net a seller receives after fees. */
|
|
716
|
+
interface ExecutionAdjustedBestPrice {
|
|
717
|
+
market: string;
|
|
718
|
+
price: Cents;
|
|
719
|
+
rawPrice: Cents;
|
|
720
|
+
appliedFeeBps: number;
|
|
721
|
+
withdrawalFlatUsdCents?: Cents;
|
|
722
|
+
executability: number;
|
|
723
|
+
updatedAt: IsoDateString;
|
|
724
|
+
isStale: boolean;
|
|
725
|
+
reasons: string[];
|
|
726
|
+
}
|
|
727
|
+
/** Execution-adjusted NBBO block: fee-aware best bid/ask re-ranked by executability. */
|
|
728
|
+
interface ExecutionAdjustedNbbo {
|
|
729
|
+
bestAsk: ExecutionAdjustedBestPrice | null;
|
|
730
|
+
bestBid: ExecutionAdjustedBestPrice | null;
|
|
731
|
+
spreadBps: number | null;
|
|
732
|
+
locked: boolean;
|
|
733
|
+
crossed: boolean;
|
|
734
|
+
executableConfidence: number;
|
|
735
|
+
reasons: string[];
|
|
736
|
+
feeModelVersion: string;
|
|
737
|
+
calculatedAt: IsoDateString;
|
|
738
|
+
}
|
|
715
739
|
/** `GET /v1/nbbo` (camelCase). */
|
|
716
740
|
interface NbboResponse {
|
|
717
741
|
marketHashName: string;
|
|
@@ -725,6 +749,8 @@ interface NbboResponse {
|
|
|
725
749
|
crossed: boolean;
|
|
726
750
|
confidence: number;
|
|
727
751
|
calculatedAt: IsoDateString;
|
|
752
|
+
/** Execution-adjusted "real best market"; null when no quotes. */
|
|
753
|
+
executionAdjusted: ExecutionAdjustedNbbo | null;
|
|
728
754
|
}
|
|
729
755
|
interface NbboDepthParams extends NbboParams {
|
|
730
756
|
/** Aggregated depth levels per side (1–50, default 10). */
|
|
@@ -944,4 +970,4 @@ declare function mapWithConcurrency<T, R>(items: readonly T[], limit: number, fn
|
|
|
944
970
|
|
|
945
971
|
declare const VERSION = "0.1.0";
|
|
946
972
|
|
|
947
|
-
export { APIError, ATTRIBUTE_MARKETS, type AggregatePriceData, type AggregationsBatchParams, type AggregationsParams, AggregationsResource, type AllItemsItem, type AllItemsLatestPrice, type AllItemsPriceAggregates, type AllItemsResponse, type ArbitrageFreshness, type ArbitrageOpportunitiesResponse, type ArbitrageOpportunity, type ArbitrageParams, type ArbitrageQuote, ArbitrageResource, type ArbitrageSort, type AttributeBucketDimensions, type AttributeGranularity, type AttributeHistoryBucket, type AttributeHistoryItem, type AttributeHistoryParams, type AttributeHistoryPoint, type AttributeHistoryResponse, type AttributeLatestParams, type AttributeLatestResponse, type AttributeMarket, type AttributePriceBucket, type AttributePriceItem, AttributePricesResource, type AttributeRangeDimension, type AttributeType, type AuthScheme, AuthenticationError, BaseResource, type BestPrice, type Buff163AttributeHistoryResponse, type Buff163AttributeLatestResponse, type Buff163HistoryParams, type Buff163LatestParams, Buff163Resource, type Cents, type ClientConfig, type ClientHooks, ConfigurationError, type CurrentPriceParams, type CurrentPriceResponse, DEFAULT_BASE_URL, DEFAULT_RETRY, DEFAULT_TIMEOUT_MS, type ErrorResponseInput, FeatureNotAvailableError, type FormatUsdOptions, type FreshnessResponse, type HistoryListingType, type HistoryListingTypeInput, HistoryResource, type IsoDateString, type ItemMaxOrders, type ItemMinPrices, type ItemPriceListResponse, type ItemSearchParams, ItemsResource, KNOWN_MARKETS, type KnownMarket, type MarketAnalyticsParams, type MarketAnalyticsPoint, MarketAnalyticsResource, type MarketAnalyticsResponse, type MarketFreshness, type MarketHealthStatus, type MarketLatency, type MarketLatencyResponse, type MarketMaxOrder, type MarketMinPrice, type MarketPricePoint, type MarketSeries, type MaxOrdersResponse, type MinPricesResponse, type NbboBestPrice, type NbboDepthLevel, type NbboDepthParams, type NbboDepthQuote, type NbboDepthResponse, type NbboParams, NbboResource, type NbboResponse, NetworkError, NotFoundError, type PaginationMeta, ParseError, PermissionError, type PriceHistoryByMarketResponse, type PriceHistoryInterval, type PriceHistoryParams, type PriceHistoryPoint, type PriceHistoryResponse, type PricingListing, type PricingListingFloatCoverage, type PricingListingFloatSummary, type PricingListingObservedFloatSource, type PricingListingsParams, type PricingListingsResponse, PricingResource, RESPONSE_META, RateLimitError, type RateLimitErrorOptions, type RateLimitInfo, type RateLimitWindow, type RecommendationParams, type RecommendationResponse, RecommendationsResource, type RequestHookContext, type RequestOptions, type ResolvedConfig, type ResponseHookContext, type ResponseMeta, type RetryConfig, type RetryHookContext, type SalesHistoryWindow, ServerError, SkinpricerClient, SkinpricerError, type SkinpricerErrorOptions, StatusResource, TimeoutError, VERSION, ValidationError, type ValidationErrorOptions, type WithMeta, centsToUsd, chunk, errorFromResponse, formatUsd, getMeta, mapWithConcurrency, parseIsoDate, resolveConfig };
|
|
973
|
+
export { APIError, ATTRIBUTE_MARKETS, type AggregatePriceData, type AggregationsBatchParams, type AggregationsParams, AggregationsResource, type AllItemsItem, type AllItemsLatestPrice, type AllItemsPriceAggregates, type AllItemsResponse, type ArbitrageFreshness, type ArbitrageOpportunitiesResponse, type ArbitrageOpportunity, type ArbitrageParams, type ArbitrageQuote, ArbitrageResource, type ArbitrageSort, type AttributeBucketDimensions, type AttributeGranularity, type AttributeHistoryBucket, type AttributeHistoryItem, type AttributeHistoryParams, type AttributeHistoryPoint, type AttributeHistoryResponse, type AttributeLatestParams, type AttributeLatestResponse, type AttributeMarket, type AttributePriceBucket, type AttributePriceItem, AttributePricesResource, type AttributeRangeDimension, type AttributeType, type AuthScheme, AuthenticationError, BaseResource, type BestPrice, type Buff163AttributeHistoryResponse, type Buff163AttributeLatestResponse, type Buff163HistoryParams, type Buff163LatestParams, Buff163Resource, type Cents, type ClientConfig, type ClientHooks, ConfigurationError, type CurrentPriceParams, type CurrentPriceResponse, DEFAULT_BASE_URL, DEFAULT_RETRY, DEFAULT_TIMEOUT_MS, type ErrorResponseInput, type ExecutionAdjustedBestPrice, type ExecutionAdjustedNbbo, FeatureNotAvailableError, type FormatUsdOptions, type FreshnessResponse, type HistoryListingType, type HistoryListingTypeInput, HistoryResource, type IsoDateString, type ItemMaxOrders, type ItemMinPrices, type ItemPriceListResponse, type ItemSearchParams, ItemsResource, KNOWN_MARKETS, type KnownMarket, type MarketAnalyticsParams, type MarketAnalyticsPoint, MarketAnalyticsResource, type MarketAnalyticsResponse, type MarketFreshness, type MarketHealthStatus, type MarketLatency, type MarketLatencyResponse, type MarketMaxOrder, type MarketMinPrice, type MarketPricePoint, type MarketSeries, type MaxOrdersResponse, type MinPricesResponse, type NbboBestPrice, type NbboDepthLevel, type NbboDepthParams, type NbboDepthQuote, type NbboDepthResponse, type NbboParams, NbboResource, type NbboResponse, NetworkError, NotFoundError, type PaginationMeta, ParseError, PermissionError, type PriceHistoryByMarketResponse, type PriceHistoryInterval, type PriceHistoryParams, type PriceHistoryPoint, type PriceHistoryResponse, type PricingListing, type PricingListingFloatCoverage, type PricingListingFloatSummary, type PricingListingObservedFloatSource, type PricingListingsParams, type PricingListingsResponse, PricingResource, RESPONSE_META, RateLimitError, type RateLimitErrorOptions, type RateLimitInfo, type RateLimitWindow, type RecommendationParams, type RecommendationResponse, RecommendationsResource, type RequestHookContext, type RequestOptions, type ResolvedConfig, type ResponseHookContext, type ResponseMeta, type RetryConfig, type RetryHookContext, type SalesHistoryWindow, ServerError, SkinpricerClient, SkinpricerError, type SkinpricerErrorOptions, StatusResource, TimeoutError, VERSION, ValidationError, type ValidationErrorOptions, type WithMeta, centsToUsd, chunk, errorFromResponse, formatUsd, getMeta, mapWithConcurrency, parseIsoDate, resolveConfig };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skinpricer/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Official, fully-typed TypeScript SDK for the Skinpricer pricing API (CS2 skin market pricing data).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Skinpricer",
|
|
7
7
|
"homepage": "https://skinpricer.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/Skinpricer/sdk.git"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "https://github.com/Skinpricer/sdk/issues"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"skinpricer",
|
|
@@ -54,22 +54,6 @@
|
|
|
54
54
|
"access": "public",
|
|
55
55
|
"provenance": true
|
|
56
56
|
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"build": "tsup",
|
|
59
|
-
"dev": "tsup --watch",
|
|
60
|
-
"clean": "rm -rf dist coverage",
|
|
61
|
-
"typecheck": "tsc --noEmit",
|
|
62
|
-
"lint": "eslint .",
|
|
63
|
-
"lint:fix": "eslint . --fix",
|
|
64
|
-
"format": "prettier --write \"**/*.{ts,mjs,json,md}\"",
|
|
65
|
-
"test": "vitest run",
|
|
66
|
-
"test:watch": "vitest",
|
|
67
|
-
"test:cov": "vitest run --coverage",
|
|
68
|
-
"test:types": "vitest --typecheck run",
|
|
69
|
-
"check:package": "publint && attw --pack .",
|
|
70
|
-
"prepublishOnly": "pnpm lint && pnpm typecheck && pnpm test && pnpm build && pnpm check:package",
|
|
71
|
-
"release": "changeset publish"
|
|
72
|
-
},
|
|
73
57
|
"dependencies": {},
|
|
74
58
|
"peerDependencies": {},
|
|
75
59
|
"devDependencies": {
|
|
@@ -86,5 +70,19 @@
|
|
|
86
70
|
"typescript-eslint": "^8.10.0",
|
|
87
71
|
"vitest": "^2.1.3"
|
|
88
72
|
},
|
|
89
|
-
"
|
|
90
|
-
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "tsup",
|
|
75
|
+
"dev": "tsup --watch",
|
|
76
|
+
"clean": "rm -rf dist coverage",
|
|
77
|
+
"typecheck": "tsc --noEmit",
|
|
78
|
+
"lint": "eslint .",
|
|
79
|
+
"lint:fix": "eslint . --fix",
|
|
80
|
+
"format": "prettier --write \"**/*.{ts,mjs,json,md}\"",
|
|
81
|
+
"test": "vitest run",
|
|
82
|
+
"test:watch": "vitest",
|
|
83
|
+
"test:cov": "vitest run --coverage",
|
|
84
|
+
"test:types": "vitest --typecheck run",
|
|
85
|
+
"check:package": "publint && attw --pack .",
|
|
86
|
+
"release": "changeset publish"
|
|
87
|
+
}
|
|
88
|
+
}
|