SDK package and version
@polymarket/client@0.8.1
Runtime
Node.js >= 24, pnpm
What happened?
The AcceptedOrderResponse type returned by createLimitOrder() and createMarketOrder() has a status: OrderPostStatus field. However, the OrderPostStatus enum is not re-exported as a value from @polymarket/client.
OrderResponseErrorCode from the same file (order-response.ts) IS explicitly re-exported at packages/client/src/index.ts:7, but OrderPostStatus is missing.
This forces consumers to import from @polymarket/bindings/clob directly a package described as "not intended for direct usage."
All integration tests in the repo confirm this by importing from @polymarket/bindings/clob:
tests/integration/orders.test.ts
tests/integration/session-keys.test.ts
tests/integration/subscriptions.test.ts
Minimal reproduction
// Consumer wants to check if their order matched:
import { createSecureClient, OrderPostStatus } from '@polymarket/client';
// ^^^^^^^^^^^^^^^ not exported as a value
const client = createSecureClient({ ... });
const response = await client.createLimitOrder({ ... });
if (response.ok && response.status === OrderPostStatus.MATCHED) {
// handle matched order
}
// Workaround: import from internal package
import { OrderPostStatus } from '@polymarket/bindings/clob';
Expected behavior, actual behavior, or logs
Expected: OrderPostStatus should be re-exported from @polymarket/client alongside OrderResponseErrorCode, since both are consumer-facing enums from the same file.
Fix: Add OrderPostStatus to the explicit re-exports in packages/client/src/index.ts:
export {
NotificationType,
OrderPostStatus, // <-- add this
OrderResponseErrorCode,
PriceHistoryInterval,
SignatureType,
} from '@polymarket/bindings/clob';
SDK package and version
@polymarket/client@0.8.1
Runtime
Node.js >= 24, pnpm
What happened?
The
AcceptedOrderResponsetype returned bycreateLimitOrder()andcreateMarketOrder()has astatus: OrderPostStatusfield. However, theOrderPostStatusenum is not re-exported as a value from@polymarket/client.OrderResponseErrorCodefrom the same file (order-response.ts) IS explicitly re-exported atpackages/client/src/index.ts:7, butOrderPostStatusis missing.This forces consumers to import from
@polymarket/bindings/clobdirectly a package described as "not intended for direct usage."All integration tests in the repo confirm this by importing from
@polymarket/bindings/clob:tests/integration/orders.test.tstests/integration/session-keys.test.tstests/integration/subscriptions.test.tsMinimal reproduction
Expected behavior, actual behavior, or logs
Expected: OrderPostStatus should be re-exported from @polymarket/client alongside OrderResponseErrorCode, since both are consumer-facing enums from the same file.
Fix: Add OrderPostStatus to the explicit re-exports in packages/client/src/index.ts:
export {
NotificationType,
OrderPostStatus, // <-- add this
OrderResponseErrorCode,
PriceHistoryInterval,
SignatureType,
} from '@polymarket/bindings/clob';