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.
[
CHANNEL_ID
EVENT
[
MTS, //omitted for 'fon' event
TYPE, //omitted for 'fon' event
MESSAGE_ID, //omitted for 'fon' event
null, //omitted for 'fon' event
[
ID,
SYMBOL,
MTS_CREATED,
MTS_UPDATED,
AMOUNT,
AMOUNT_ORIG,
OFFER_TYPE,
_PLACEHOLDER,
_PLACEHOLDER,
FLAGS,
OFFER_STATUS,
_PLACEHOLDER,
_PLACEHOLDER,
_PLACEHOLDER,
RATE,
PERIOD,
NOTIFY,
HIDDEN,
_PLACEHOLDER,
RENEW,
_PLACEHOLDER
]
CODE, //omitted for 'fon' event
STATUS, //omitted for 'fon' event
TEXT //omitted for 'fon' event
]
]
[0,"n",[1575293958819,"fon-req",null,null,[41238934,null,null,null,500,null,null,null,null,null,null,null,null,null,0.02,2,null,null,null,null,null],null,"SUCCESS","Submitting funding offer of 500.0 UST at 2.000 for 2 days."]]
[0,"fon",[41238934,"fUST",1575293959000,1575293959000,500,500,"LIMIT",null,null,0,"ACTIVE",null,null,null,0.02,2,0,0,null,0,null]]
FRR offer
To 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 | int16 | See https://docs.bitfinex.com/v2/docs/flag-values. |
Response Fields
Term | Type | Description |
---|---|---|
CHANNEL_ID | int | ID of the channel. (0 for account info messages) |
EVENT | string | Type of event ('n' for notification) |
MTS | int | Millisecond Time Stamp of the update |
TYPE | string | Purpose of notification ('on-req', 'oc-req', 'uca', 'fon-req', 'foc-req') |
MESSAGE_ID | int | unique ID of the message |
ID | integer | Offer ID |
SYMBOL | string | The currency of the offer (fUSD, etc) |
MTS_CREATED | int | Millisecond Time Stamp when the offer was created |
MTS_UPDATED | int | Millisecond Time Stamp when the offer was created |
AMOUNT | float | Current amount of the offer |
AMOUNT_ORIG | float | Amount of the initial offer |
OFFER_TYPE | string | Offer Type |
FLAGS | int | Flags active on the offer; see https://docs.bitfinex.com/v2/docs/flag-values |
OFFER_STATUS | string | Offer Status: ACTIVE, EXECUTED, PARTIALLY FILLED, CANCELED |
RATE | float | Rate of the offer |
PERIOD | int | Period of the offer |
NOTIFY | boolean | True / false |
HIDDEN | int | 0 if false, 1 if true |
RENEW | boolean | True / false |
CODE | null or integer | Work in progress |
STATUS | string | Status of the notification; it may vary over time (SUCCESS, ERROR, FAILURE, ...) |
TEXT | string | Text of the notification |