-- Ledger
-- ID, RefId, epoch time, Description, currency, amount, balance
/*
<ledger_id> = ledger info
    refid = reference id
    time = unx timestamp of ledger
    type = type of ledger entry
    aclass = asset class
    asset = asset
    amount = transaction amount
    fee = transaction fee
    balance = resulting balance


    aclass = asset class (optional):
        currency (default)
    asset = comma delimited list of assets to restrict output to (optional.  default = all)
    type = type of ledger to retrieve (optional):
        all (default)
        deposit
        withdrawal
        trade
        margin
    start = starting unix timestamp or ledger id of results (optional.  exclusive)
    end = ending unix timestamp or ledger id of results (optional.  inclusive)
    ofs = result offset
*/

--Position (Derived?)
/*
<position_txid> = open position info
    ordertxid = order responsible for execution of trade
    pair = asset pair
    time = unix timestamp of trade
    type = type of order used to open position (buy/sell)
    ordertype = order type used to open position
    cost = opening cost of position (quote currency unless viqc set in oflags)
    fee = opening fee of position (quote currency)
    vol = position volume (base currency unless viqc set in oflags)
    vol_closed = position volume closed (base currency unless viqc set in oflags)
    margin = initial margin (quote currency)
    value = current value of remaining position (if docalcs requested.  quote currency)
    ----------------------------------
    net = unrealized profit/loss of remaining position (if docalcs requested.  quote currency, quote currency scale)
    misc = comma delimited list of miscellaneous info
    oflags = comma delimited list of order flags
        viqc = volume in quote currency
*/

/*
ORders
refid = Referral order transaction id that created this order
userref = user reference id
status = status of order:
    pending = order pending book entry
    open = open order
    closed = closed order
    canceled = order canceled
    expired = order expired
opentm = unix timestamp of when order was placed
starttm = unix timestamp of order start time (or 0 if not set)
expiretm = unix timestamp of order end time (or 0 if not set)
descr = order description info
    pair = asset pair
    type = type of order (buy/sell)
    ordertype = order type (See Add standard order)
    price = primary price
    price2 = secondary price
    leverage = amount of leverage
    order = order description
    close = conditional close order description (if conditional close set)
vol = volume of order (base currency unless viqc set in oflags)
vol_exec = volume executed (base currency unless viqc set in oflags)
cost = total cost (quote currency unless unless viqc set in oflags)
fee = total fee (quote currency)
price = average price (quote currency unless viqc set in oflags)
stopprice = stop price (quote currency, for trailing stops)
limitprice = triggered limit price (quote currency, when limit based order type triggered)
misc = comma delimited list of miscellaneous info
    stopped = triggered by stop price
    touched = triggered by touch price
    liquidated = liquidation
    partial = partial fill
oflags = comma delimited list of order flags
    viqc = volume in quote currency
    fcib = prefer fee in base currency (default if selling)
    fciq = prefer fee in quote currency (default if buying)
    nompp = no market price protection
trades = array of trade ids related to order (if trades info requested and data available)
*/
