Create a new funding offer.
Create a new funding offer by constructing a payload using the "fon" (funding offer new) abbreviation and include an offer details object. Please look to the sidebar for examples.
Upon sending an offer, you will receive a confirmation as an 'n' (notification) event and, if the offer is placed successfully, a confirmation through a "fon" (funding offer new) event. Example responses are included in the sidebar. Please look to the Funding Offers and Notifications pages 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,
"fon",
null,
{
type: TYPE,
symbol: SYMBOL,
amount: AMOUNT,
rate: RATE,
period: PERIOD,
flags: FLAGS
}
]
// Examples
[
0,
'fon',
null,
{
type: "LIMIT",
symbol: "fUSD",
amount: '50',
rate: '0.0002',
period: 7,
flags: 0
}
]
[
0,
'fon',
null,
{
type: "FRRDELTAVAR",
symbol: "fUSD",
amount: '-50',
rate: '0.0001',
period: 7,
flags: 64
}
]// When the offer request is submitted you will receive an 'n' (notification) event as confirmation. If the offer placement is successful, you will also receive an 'fon' (funding offer new) event. Both events are sent through CHANNEL_ID = 0.
[
0, // CHANNEL_ID
"n", // EVENT
[
1575293958819, // MTS
"fon-req", // TYPE
null, // MESSAGE_ID
null, // _PLACEHOLDER
[
41238934, // ID
null, // SYMBOL
null, // MTS_CREATED
null, // MTS_UPDATED
500, // AMOUNT
null, // AMOUNT_ORIG
null, // OFFER_TYPE
null, // _PLACEHOLDER
null, // _PLACEHOLDER
null, // FLAGS
null, // OFFER_STATUS
null, // _PLACEHOLDER
null, // _PLACEHOLDER
null, // _PLACEHOLDER
0.02, // RATE
2, // PERIOD
null, // NOTIFY
null, // HIDDEN
null, // _PLACEHOLDER
null, // RENEW
null // _PLACEHOLDER
],
null, // CODE
"SUCCESS", // STATUS
"Submitting funding offer of 500.0 UST at 2.000 for 2 days." // TEXT
]
]
[
0, // CHANNEL_ID
"fon", // EVENT
[
41238934, // ID
"fUST", // SYMBOL
1575293959000, // MTS_CREATED
1575293959000, // 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
]
]
FRR offerTo place an FRR offer, use type FRRDELTAVAR and specify the rate as 0. This will place an FRRDELTAVAR offer with an offset of 0.
Request fields
| Name | Type | Description |
|---|---|---|
| type | String | LIMIT, FRRDELTAVAR, FRRDELTAFIX |
| symbol | String | Symbol (fUSD, fBTC, ...) |
| amount | Decimal string | Amount (> 0 for offer, < 0 for bid) |
| rate | Decimal string | Rate (or offset for FRRDELTA offers) |
| period | Decimal | Time period of offer. Minimum 2 days. Maximum 120 days. |
| flags | Int | See <https://docs.bitfinex.com/v2/docs/flag-values>. |
New 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 ('fon-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 |
"fon" 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 ('fon' for funding offer new) |
| [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 |
[ . . . ] | |||
