bfxapi: edit comments for doc generating

This commit is contained in:
JacobPlaster
2019-10-09 10:41:26 +01:00
committed by Jacob Plaster
parent 1e307d193e
commit 3e4beb5f7e
2 changed files with 203 additions and 1 deletions

View File

@@ -100,6 +100,7 @@ class BfxRest:
"""
Get all of the public candles between the start and end period.
# Attributes
@param symbol symbol string: pair symbol i.e tBTCUSD
@param secton string: available values: "last", "hist"
@param start int: millisecond start time
@@ -120,6 +121,7 @@ class BfxRest:
"""
Get all of the public trades between the start and end period.
# Attributes
@param symbol symbol string: pair symbol i.e tBTCUSD
@param start int: millisecond start time
@param end int: millisecond end time
@@ -136,6 +138,7 @@ class BfxRest:
"""
Get the public orderbook for a given symbol.
# Attributes
@param symbol symbol string: pair symbol i.e tBTCUSD
@param precision string: level of price aggregation (P0, P1, P2, P3, P4, R0)
@param length int: number of price points ("25", "100")
@@ -151,6 +154,7 @@ class BfxRest:
Get tickers for the given symbol. Tickers shows you the current best bid and ask,
as well as the last trade price.
# Attributes
@param symbols symbol string: pair symbol i.e tBTCUSD
@return Array [ SYMBOL, BID, BID_SIZE, ASK, ASK_SIZE, DAILY_CHANGE,
DAILY_CHANGE_PERC, LAST_PRICE, VOLUME, HIGH, LOW ]
@@ -164,6 +168,7 @@ class BfxRest:
Get tickers for the given symbols. Tickers shows you the current best bid and ask,
as well as the last trade price.
# Attributes
@param symbols Array<string>: array of symbols i.e [tBTCUSD, tETHUSD]
@return Array [ SYMBOL, BID, BID_SIZE, ASK, ASK_SIZE, DAILY_CHANGE, DAILY_CHANGE_PERC,
LAST_PRICE, VOLUME, HIGH, LOW ]
@@ -176,6 +181,7 @@ class BfxRest:
"""
Gets platform information for derivative symbol.
# Attributes
@param derivativeSymbol string: i.e tBTCF0:USTF0
@return [KEY/SYMBOL, MTS, PLACEHOLDER, DERIV_PRICE, SPOT_PRICE, PLACEHOLDER, INSURANCE_FUND_BALANCE4,
PLACEHOLDER, PLACEHOLDER, FUNDING_ACCRUED, FUNDING_STEP, PLACEHOLDER]
@@ -189,6 +195,7 @@ class BfxRest:
"""
Gets platform information for a collection of derivative symbols.
# Attributes
@param derivativeSymbols Array<string>: array of symbols i.e [tBTCF0:USTF0 ...] or ["ALL"]
@return [KEY/SYMBOL, MTS, PLACEHOLDER, DERIV_PRICE, SPOT_PRICE, PLACEHOLDER, INSURANCE_FUND_BALANCE4,
PLACEHOLDER, PLACEHOLDER, FUNDING_ACCRUED, FUNDING_STEP, PLACEHOLDER]
@@ -215,6 +222,7 @@ class BfxRest:
"""
Get all of the active orders associated with API_KEY - Requires authentication.
# Attributes
@param symbol string: pair symbol i.e tBTCUSD
@return Array <models.Order>
"""
@@ -227,6 +235,7 @@ class BfxRest:
Get all of the orders between the start and end period associated with API_KEY
- Requires authentication.
# Attributes
@param symbol string: pair symbol i.e tBTCUSD
@param start int: millisecond start time
@param end int: millisecond end time
@@ -254,6 +263,7 @@ class BfxRest:
Get all of the trades that have been generated by the given order associated with API_KEY
- Requires authentication.
# Attributes
@param symbol string: pair symbol i.e tBTCUSD
@param order_id string: id of the order
@return Array <models.Trade>
@@ -267,6 +277,7 @@ class BfxRest:
Get all of the trades between the start and end period associated with API_KEY
- Requires authentication.
# Attributes
@param symbol string: pair symbol i.e tBTCUSD
@param start int: millisecond start time
@param end int: millisecond end time
@@ -293,6 +304,7 @@ class BfxRest:
Get all of the funding offers between the start and end period associated with API_KEY
- Requires authentication.
# Attributes
@param symbol string: pair symbol i.e tBTCUSD
@param start int: millisecond start time
@param end int: millisecond end time
@@ -319,6 +331,7 @@ class BfxRest:
Get all of the funding loans between the start and end period associated with API_KEY
- Requires authentication.
# Attributes
@param symbol string: pair symbol i.e tBTCUSD
@param start int: millisecond start time
@param end int: millisecond end time
@@ -340,6 +353,7 @@ class BfxRest:
Get all of the funding credits between the start and end period associated with API_KEY
- Requires authentication.
# Attributes
@param symbol string: pair symbol i.e tBTCUSD
@param start int: millisecond start time
@param end int: millisecond end time
@@ -356,6 +370,7 @@ class BfxRest:
"""
Submits a new funding offer
# Attributes
@param symbol string: pair symbol i.e fUSD
@param amount float: funding size
@param rate float: percentage rate to charge per a day
@@ -379,6 +394,7 @@ class BfxRest:
"""
Cancel a funding offer
# Attributes
@param fundingId int: the id of the funding offer
"""
endpoint = "auth/w/funding/offer/cancel"
@@ -389,6 +405,7 @@ class BfxRest:
"""
Transfer funds between wallets
# Attributes
@param from_wallet string: wallet name to transfer from i.e margin, exchange
@param to_wallet string: wallet name to transfer to i.e margin, exchange
@param from_currency string: currency symbol to tranfer from i.e BTC, USD
@@ -410,6 +427,7 @@ class BfxRest:
"""
Get the deposit address for the given wallet and protocol
# Attributes
@param wallet string: wallet name i.e margin, exchange
@param method string: transfer protocol i.e bitcoin
"""
@@ -427,6 +445,7 @@ class BfxRest:
Creates a new deposit address for the given wallet and protocol.
Previously generated addresses remain linked.
# Attributes
@param wallet string: wallet name i.e margin, exchange
@param method string: transfer protocol i.e bitcoin
"""
@@ -434,7 +453,13 @@ class BfxRest:
async def submit_wallet_withdraw(self, wallet, method, amount, address):
"""
`/v2/auth/w/withdraw` (params: `wallet`, `method`, `amount`, `address
Submits a request to withdraw crypto funds to an external wallet.
# Attributes
@param wallet string: wallet name i.e margin, exchange
@param method string: transfer protocol i.e bitcoin
@param amount float: amount of funds to withdraw
@param address string: external address to withdraw to
"""
endpoint = "auth/w/withdraw"
payload = {
@@ -471,6 +496,7 @@ class BfxRest:
"""
Submit a new order
# Attributes
@param gid: assign the order to a group identifier
@param symbol: the name of the symbol i.e 'tBTCUSD
@param price: the price you want to buy/sell at (must be positive)
@@ -523,6 +549,7 @@ class BfxRest:
"""
Cancel an existing open order
# Attributes
@param orderId: the id of the order that you want to update
"""
endpoint = "auth/w/order/cancel"
@@ -535,6 +562,7 @@ class BfxRest:
"""
Update an existing order
# Attributes
@param orderId: the id of the order that you want to update
@param price: the price you want to buy/sell at (must be positive)
@param amount: order size: how much you want to buy/sell,
@@ -581,6 +609,7 @@ class BfxRest:
"""
Update the amount of callateral used to back a derivative position.
# Attributes
@param symbol of the derivative i.e 'tBTCF0:USTF0'
@param collateral: amount of collateral/value to apply to the open position
"""