PMWallets
中文
WebSocket

Fill stream

Pushes the fills of every entity your account subscribes to; anything you send is ignored. Delivery is best effort and frames are not resent: a gap in seq or a new session means you missed frames, which GET /v1/account/fills returns. One API connection per account. The server pings every 15 seconds.

WSSwss://api.pmwallets.com/v1/wsAPI key

Header parameters

x-api-keystringrequired

Your API key.

Query parameters

clientIdstring

8 to 64 characters of A-Za-z0-9_-, one per running client and the same on every reconnect, so a reconnect replaces its own dropped connection.

takeoverstring

Set to 1 to replace the API client already connected.

Allowed values: 1

Message fields

typestringrequired

hello on connecting, then fill. blocked when the connection is refused.

dataobject

The fill. Every field is on the fill event page.

sessionstring

Changes when you reconnect.

seqinteger

Consecutive within a session.

reasonstring

blocked only: why the connection was refused, such as api_seat_taken.

Status and close codes

1000Replaced by a takeover. Stop; do not reconnect.
1012The service is restarting. Reconnect at once, then fetch what you missed.
1013The stream is at capacity. Try again shortly.
4409Website connection refused: an API client holds the stream.
4410Website connection replaced by an API client.
4411Another API client is connected. Reconnect with takeover=1 to replace it.