Funding Credits

Receive a snapshot and updates for any funding credits (funds used in active positions) on your account.

Subscribe to the account information channel to keep track of your funding credits. The account information channel provides a snapshot and updates on the funding credits in your account. The snapshot is delivered upon subscribing and any changes to your funding credits will be provided as updates for as long as the channel remains open. Any authenticated connection is automatically subscribed to the account information channel.

Example code to open an authenticated connection can be found on our Authenticated Channels Page.

Funding credits events are sent with CHAN_ID = 0 and can be identified by looking at the TYPE stream field. Funding credits events will use one of the following abbreviations: 'fcs' (funding credits snapshot), 'fcn' (funding credits new), 'fcu' (funding credits update), 'fcc' (funding credits close).

[
  0, //CHAN_ID
  "fcs", //MSG_TYPE
  [
    [
      26223578, //CREDIT_ID
      "fUST", //SYMBOL
      1, //SIDE
      1575052261000, //MTS_CREATE
      1575296187000, //MTS_UPDATE
      350, //AMOUNT
      0, //FLAGS
      "ACTIVE", //STATUS
      null, //PLACEHOLDER
      null, //PLACEHOLDER
      null, //PLACEHOLDER
      0, //RATE
      30, //PERIOD
      1575052261000, //MTS_OPENING
      1575293487000, //MTS_LAST_PAYOUT
      0, //NOTIFY
      0, //HIDDEN
      null, //PLACEHOLDER
      0, //RENEW
      null, //RATE_REAL
      0, //NO_CLOSE
      "tBTCUST" //POSITION_PAIR
    ], //FUNDING_CREDIT_ARRAY
    ...
  ] //FUNDING_CREDITS_SNAPSHOT
]
[
  0, //CHAN_ID
  "fcu", //MSG_TYPE
  [
    26223578, //CREDIT_ID
    "fUST", //SYMBOL
    1, //SIDE
    1575052261000, //MTS_CREATE
    1575296787000, //MTS_UPDATE
    350, //AMOUNT
    0, //FLAGS
    "ACTIVE", //STATUS
    null, //PLACEHOLDER
    null, //PLACEHOLDER
    null, //PLACEHOLDER
    0, //RATE
    30, //PERIOD
    1575052261000, //MTS_OPENING
    1575293487000, //MTS_LAST_PAYOUT
    0, //NOTIFY
    0, //HIDDEN
    null, //PLACEHOLDER
    0, //RENEW
    null, //RATE_REAL
    0, //NO_CLOSE
    "tBTCUST" //POSITION_PAIR
  ] //FUNDING_CREDIT_ARRAY
]

Funding credits snapshot data

IndexFieldTypeDescription
[0]CHANNEL_IDIntIdentification number assigned to the channel for the duration of this connection.
[1]MSG_TYPEString'fcs' (funding credits snapshot)
[2]FUNDING_CREDITS_SNAPSHOTArrayArray with an array of active funding credits(Indices [0...n] will be funding credits)
[2][0...n]FUNDING_CREDIT_ARRAYArrayFunding credit array

Funding credits update data

IndexFieldTypeDescription
[0]CHANNEL_IDIntIdentification number assigned to the channel for the duration of this connection.
[1]MSG_TYPEString'fcn' (funding credit new), 'fcu' (funding credit update), 'foc' (funding credit cancel (cancelled or fully executed))
[2]FUNDING_CREDIT_ARRAYArrayFunding credit array

Funding credit arrays

Index Field Type Description
[0]CREDIT_IDIntegerCredit ID
[1]SYMBOLStringThe currency of the credit (fUSD, etc)
[2]SIDEInt1 if you are the lender, 0 if you are both the lender and borrower, -1 if you're the borrower
[3]MTS_CREATEIntMillisecond Time Stamp when the credit was created
[4]MTS_UPDATEIntMillisecond Time Stamp when the credit was updated
[5]AMOUNTFloatAmount the credit is for
[6]FLAGSObjectFuture params object (stay tuned)
[7]STATUSStringCredit Status: ACTIVE, EXECUTED, PARTIALLY FILLED, CANCELED
[ . . . ]
[11]RATEFloatRate of the credit
[12]PERIODIntPeriod of the credit
[13]MTS_OPENINGIntMillisecond Time Stamp when the funding was opened
[14]MTS_LAST_PAYOUTIntMillisecond Time Stamp when the last payout was received
[15]NOTIFYInt0 if false, 1 if true
[16]HIDDENInt0 if false, 1 if true
[ . . . ]
[18]RENEWInt0 if false, 1 if true
[19]RATE_REALFloatThe calculated rate for FRR and FRRDELTAFIX
[20]NO_CLOSEInt0 if false, 1 if true (whether the funding should be closed when the position is closed)
[21]POSITION_PAIRStringThe pair of the position that the funding is used for