Account Log

This subscription feed publishes account information.

Authentication is required.

Feed

Event Type

API Keys Original & Signed Challenge
account_log
subscribe / unsubscribe
Any Yes
Sample Sent Message
{  
    "event":"subscribe",
    "feed":"account_log",
    "api_key":"CMl2SeSn09Tz+2tWuzPiPUjaXEQRGq6qv5UaexXuQ3SnahDQU/gO3aT+",
    "original_challenge":"226aee50-88fc-4618-a42a-34f7709570b2",
    "signed_challenge":"RE0DVOc7vS6pzcEjGWd/WJRRBWb54RkyvV+AZQSRl4+rap8Rlk64diR+
Z9DQILm7qxncswMmJyvP/2vgzqqh+g=="

}

 

Sample Return if Successful. 

{  
    "event":"subscribed",
    "feed":"account_log",
    "api_key":"CMl2SeSn09Tz+2tWuzPiPUjaXEQRGq6qv5UaexXuQ3SnahDQU/gO3aT+",
    "original_challenge":"226aee50-88fc-4618-a42a-34f7709570b2",
    "signed_challenge":"RE0DVOc7vS6pzcEjGWd/WJRRBWb54RkyvV+AZQSRl4+rap8Rlk64diR+
Z9DQILm7qxncswMmJyvP/2vgzqqh+g=="

} 

Field

Type Description
event
string The result, subscribed or subscribed_failed or
unsubscribed or unsubscribed_failed
feed string The requested subscription feed
api_key string The user api key
original_challege string The message that is received from a challenge request
signed_challege string The signed challenge message with user api secret

 

Sample Subscription Snapshot Data
{  
    "feed":"account_log_snapshot",
    "logs":[  
        {  
            "id":4952180,
            "date":"2018-01-25T18:53:39.000Z",
            "asset":"xbt",
            "info":"Tx Fee: -0.00000003 XBT",
            "booking_uid":"f2911ebe-6a32-4b8a-8f4b-cdc27a11124a",
            "margin_account":"xbt",
            "old_balance":15.85679386,
            "new_balance":15.85679389
        },
        {  
            "id":4952174,
            "date":"2018-01-25T18:53:39.000Z",
            "asset":"fi_xbtusd_180316",
            "info":"Bought 1 @ 10015 USD, Average Entry Price: 10342.21850502 USD",
            "booking_uid":"f2911ebe-6a32-4b8a-8f4b-cdc27a11124a",
            "margin_account":"f-xbt:usd",
            "old_balance":22272.0,
            "new_balance":22273.0
        } ….,
    ]
}

Field

Type Description
feed string The subscribed feed
logs list of structures A list containing the account logs
id positive integer  The identifier of the log
date ISO8601 datetime The creation time of the log according to server date and time
asset string The asset related of the booking
info string A description of the booking
booking_uid string The unique id of the booking
margin_account string The account name
old_balance positive float The account balance before the described in info action
new_balance positive float

The portfolio value calculated as balance plus unrealized pnl value

 

Sample Subscription Delta Data
{  
    "feed":"account_log",
    "new_entry":{  
        "id":4952182,
        "date":"2018-01-26T09:41:00.654Z",
        "asset":"fi_xbtusd_180316",
        "info":"Bought 1 @ 10015 USD, Average Entry Price: 10342.203334 USD",
        "booking_uid":"3fa07d93-4196-451e-9c5a-c171283737a3",
        "margin_account":"N/A",
        "old_balance":22273.0,
        "new_balance":22274.0
    }
}

Field

Type Description
feed string The subscribed feed
new_entry structure The new entry in the account log
id positive integer  The identifier of the log
date ISO8601 datetime The creation time of the log according to server date and time
asset string The asset related of the booking
info string A description of the booking
booking_uid string The unique id of the booking
margin_account string The account name
old_balance positive float The account balance before the described in info action
new_balance positive float

The portfolio value calculated as balance plus unrealized pnl value

 

Sample Return if Unsuccessful 
{  
    "event":"error",
    "message":"Invalid product id"
}

Field

Type Description
event string Always error
message string

An error message out of:

  • Invalid feed
  • Json Error