Cancel Offer

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

NameTypeDescription
idIntOffer ID

Cancel offer notification data

IndexFieldTypeDescription
[0]CHANNEL_IDIntID of the channel. (0 for account info messages)
[1]EVENTStringType of event ('n' for notification)
[2]NOTIFICATION_ARRAYArrayNotification array

Notification array data

IndexFieldTypeDescription
[0]MTSIntMillisecond Time Stamp of the update
[1]TYPEStringPurpose of notification ('foc-req')
[2]MESSAGE_IDIntUnique ID of the message
[3]_PLACEHOLDER
[4]OFFER_ARRAYArrayOffer data
[5]CODENull or integerWork in progress
[6]STATUSStringStatus of the notification; it may vary over time (SUCCESS, ERROR, FAILURE, ...)
[7]TEXTStringText of the notification

"foc" event data

IndexFieldTypeDescription
[0]CHANNEL_IDIntID of the channel. (0 for account info messages)
[1]TYPEStringType of event ('foc' for funding offer cancel)
[2]OFFER_ARRAYArrayOffer data

Offer Array data

Index Field Type Description
[0]IDIntOffer ID
[1]SYMBOLStringThe currency of the offer (fUSD, etc)
[2]MTS_CREATEDIntMillisecond Time Stamp when the offer was created
[3]MTS_UPDATEDIntMillisecond Time Stamp when the offer was updated
[4]AMOUNTFloatCurrent amount of the offer
[5]AMOUNT_ORIGFloatAmount of the initial offer
[6]OFFER_TYPEStringOffer Type
[ . . . ]
[9]FLAGSIntFlags active on the offer; see https://docs.bitfinex.com/v2/docs/flag-values
[10]OFFER_STATUSStringOffer Status: ACTIVE, EXECUTED, PARTIALLY FILLED, CANCELED
[ . . . ]
[14]RATEFloatRate of the offer
[15]PERIODIntPeriod of the offer
[16]NOTIFYInt0 if false, 1 if true
[17]HIDDENInt0 if false, 1 if true
[ . . . ]
[19]RENEWInt0 if false, 1 if true
[ . . . ]