Сравнение версий

Легенда

  • Эта строка добавлена.
  • Эта строка удалена.
  • Форматирование изменено.

Таблица Контента

This Heartbeat operation is provided to allow customers to automatically cancel their unmatched bets in the event of their API client/s losing connectivity with the Betfair API.

...

Панель
bgColor#FFFFFF
titleBGColor#E4B8D6
titleAPINGException
This exception is thrown when an operation fails

 

Error code

Description

INVALID_INPUT_DATA

Invalid input data

INVALID_SESSION_INFORMATION

The session token passed is invalid

NO_APP_KEY

An application key is required for this operation

NO_SESSION

A session token is required for this operation

INVALID_APP_KEY

The application key passed is invalid

UNEXPECTED_ERROR

An unexpected internal error occurred that prevented successful request processing.

Other parameters

Type

Required

Description

errorDetails

String

 

Specific error details

requestUUID

String

 

 

 

Typical Interaction

SET UP

 
[{"jsonrpc": "2.0", "method": "HeartbeatAPING/v1.0/heartbeat", "params": {"preferredTimeoutSeconds":"10"}, "id": 1}]
 
 [{"jsonrpc":"2.0","result":{"actualTimeoutSeconds":10,"actionPerformed":"NONE"},"id":1}]
 
RESET
 
 [{"jsonrpc": "2.0", "method": "HeartbeatAPING/v1.0/heartbeat", "params": {"preferredTimeoutSeconds":"0"}, "id": 1}]
 
 [{"jsonrpc":"2.0","result":{"actualTimeoutSeconds":0,"actionPerformed":"NONE"},"id":1}]
 
RE-SET UP HEARTBEAT
 
 [{"jsonrpc": "2.0", "method": "HeartbeatAPING/v1.0/heartbeat", "params": {"preferredTimeoutSeconds":"10"}, "id": 1}]
 
 [{"jsonrpc":"2.0","result":{"actualTimeoutSeconds":10,"actionPerformed":"NONE"},"id":1}]
 
You should be able to reset the heartbeat by passing a value of actualTimeoutSeconds":0 and then restarting it by setting the required value.

 

EXAMPLE OF RESPONSE IF HEARTBEAT ISN'T RECEIVED WITHIN SPECIFIED TIME
 
[{"jsonrpc": "2.0", "method": "HeartbeatAPING/v1.0/heartbeat", "params": {"preferredTimeoutSeconds":"10"}, "id": 1}]
 
[{"jsonrpc":"2.0","result":{"actualTimeoutSeconds":10,"actionPerformed":"ALL_BETS_CANCELLED"},"id":1}]