Skip to content

[Bug]: OrderPostStatus enum not re-exported from @polymarket/client #344

Description

@Sertug17

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';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions