Cancel a funding offer.
To cancel an offer, construct a payload using the "foc" (funding offer cancel) abbreviation. Include the Offer ID in the payload. Please look to the sidebar for a model and example.
When you cancel an offer, you will receive a message of the appropriated type on the "account info" channel. Example responses are included in the sidebar. Please look to the Funding Offers page for further information.
Funding offer inputs require you to run the authentication code along with additional code for the input. The authentication code can be found on our Authenticated Channels and the additional code for inputs can be found on the Websocket Inputs page.
// Model
[
0,
"foc",
null,
{
id: ID
}
]
// Examples
[
0,
'foc',
null,
{
id: 12345
}
]// When the cancellation request is submitted you will receive an 'n' (notification) event as confirmation. If the cancellation is successful, you will also receive a 'foc' (funding offer cancel) event. Both events are sent through CHANNEL_ID = 0.
[
0, // CHANNEL_ID
"n", // EVENT
[
1575294374000, // MTS
"foc-req", // TYPE
null, // MESSAGE_ID
null, // _PLACEHOLDER
[
41238934, // ID
"fUST", // SYMBOL
1575293959000, // MTS_CREATED
1575294374000, // MTS_UPDATED
500, // AMOUNT
500, // AMOUNT_ORIG
"LIMIT", // OFFER_TYPE
null, // _PLACEHOLDER
null, // _PLACEHOLDER
0, // FLAGS
"ACTIVE", // OFFER_STATUS
null, // _PLACEHOLDER
null, // _PLACEHOLDER
null, // _PLACEHOLDER
0.02, // RATE
2, // PERIOD
0, // NOTIFY
0, // HIDDEN
null, // _PLACEHOLDER
0, // RENEW
null // _PLACEHOLDER
],
null, // CODE
"SUCCESS", // STATUS
"Submitted for cancellation; waiting for confirmation (ID: 41238934)." // TEXT
]
]
[
0, // CHANNEL_ID
"foc", // EVENT
[
41238934, // ID
"fUST", // SYMBOL
1575293959000, // MTS_CREATED
1575294374000, // MTS_UPDATED
500, // AMOUNT
500, // AMOUNT_ORIG
"LIMIT", // OFFER_TYPE
null, // _PLACEHOLDER
null, // _PLACEHOLDER
0, // FLAGS
"CANCELED", // OFFER_STATUS
null, // _PLACEHOLDER
null, // _PLACEHOLDER
null, // _PLACEHOLDER
0.02, // RATE
2, // PERIOD
0, // NOTIFY
0, // HIDDEN
null, // _PLACEHOLDER
0, // RENEW
null // _PLACEHOLDER
]
]
Request fields
| Name | Type | Description |
|---|---|---|
| id | Int | Offer ID |
Cancel offer notification data
| Index | Field | Type | Description |
|---|---|---|---|
| [0] | CHANNEL_ID | Int | ID of the channel. (0 for account info messages) |
| [1] | EVENT | String | Type of event ('n' for notification) |
| [2] | NOTIFICATION_ARRAY | Array | Notification array |
Notification array data
| Index | Field | Type | Description |
|---|---|---|---|
| [0] | MTS | Int | Millisecond Time Stamp of the update |
| [1] | TYPE | String | Purpose of notification ('foc-req') |
| [2] | MESSAGE_ID | Int | Unique ID of the message |
| [3] | _PLACEHOLDER | ||
| [4] | OFFER_ARRAY | Array | Offer data |
| [5] | CODE | Null or integer | Work in progress |
| [6] | STATUS | String | Status of the notification; it may vary over time (SUCCESS, ERROR, FAILURE, ...) |
| [7] | TEXT | String | Text of the notification |
"foc" event data
| Index | Field | Type | Description |
|---|---|---|---|
| [0] | CHANNEL_ID | Int | ID of the channel. (0 for account info messages) |
| [1] | TYPE | String | Type of event ('foc' for funding offer cancel) |
| [2] | OFFER_ARRAY | Array | Offer data |
Offer Array data
| Index | Field | Type | Description |
|---|---|---|---|
| [0] | ID | Int | Offer ID |
| [1] | SYMBOL | String | The currency of the offer (fUSD, etc) |
| [2] | MTS_CREATED | Int | Millisecond Time Stamp when the offer was created |
| [3] | MTS_UPDATED | Int | Millisecond Time Stamp when the offer was updated |
| [4] | AMOUNT | Float | Current amount of the offer |
| [5] | AMOUNT_ORIG | Float | Amount of the initial offer |
| [6] | OFFER_TYPE | String | Offer Type |
[ . . . ] | |||
| [9] | FLAGS | Int | Flags active on the offer; see https://docs.bitfinex.com/v2/docs/flag-values |
| [10] | OFFER_STATUS | String | Offer Status: ACTIVE, EXECUTED, PARTIALLY FILLED, CANCELED |
[ . . . ] | |||
| [14] | RATE | Float | Rate of the offer |
| [15] | PERIOD | Int | Period of the offer |
| [16] | NOTIFY | Int | 0 if false, 1 if true |
| [17] | HIDDEN | Int | 0 if false, 1 if true |
[ . . . ] | |||
| [19] | RENEW | Int | 0 if false, 1 if true |
[ . . . ] | |||
