Description Usage Details Methods Author(s) See Also
Connect to Indodax API endpoints
1 2 |
Help you connect to Indodax API endpoints and execute your trading function.
Note: this is not a robot trading. This only helps you connect and execute your trading command.
new()Initializing new object
indodax$new(url = NULL, secret = NULL, key = NULL)
urlindodax api endpoint
secretindodax secret API
keyindodax key API
To initialize this object, you need to call 'new()' method that will span this initialize function. All the arguments are optional.
When not supplied, you need to store them in you .Renviron as: api_key_indodax for key secret_key_indodax for secret url_api_indodax for url
print()indodax$print()
Representation to print the object
posting()indodax$posting(payload, params)
payloadThe post data that will be sent
paramsThe post data in url-encoded form
Posting the data to the endpoint to get a response
Fetched object of the Indodax API
assetInfo()indodax$assetInfo(timestamp = 1578304294000, recvWindow = 1578303937000)
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Gives us information about our current assets. It will give us the information about the current balance and current held balance
dataframe of balance and held balance
transHistory()indodax$transHistory( timestamp = 1578304294000, recvWindow = 1578303937000, since = "2021-03-28 00:00:00" )
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Fetch transaction history from Indodax server
list of transaction history
withdrawHistory()indodax$withdrawHistory()
Gives us the withdrawal history
Data frame of withdrawal history
depositHistory()indodax$depositHistory()
Gives us the deposit history
Data frame of deposit history
tradeHistory()indodax$tradeHistory( pairs = "eth_idr", count = 1000, from_id = 0, end_id = 0, order = "desc", since = "2021-03-28 00:00:00", timestamp = 1578304294000, recvWindow = 1578303937000 )
pairsdefine specific pairs we want to watch. It supports the vector of pairs
countnumber of trading history of each interested coin
from_idtrading id we want to watch from
end_idthe last trading id we want to watch
orderthe order of the record
sincespecifies the interested time frame of the history
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Gives us the trading history of corresponding coin. We can grab as many as coins we are interested in by passing them as vector.
Raw content of the fetched API object
buyHistory()indodax$buyHistory( pairs = "eth_idr", count = 1000, from_id = 0, end_id = 0, order = "desc", since = "2021-03-28 00:00:00", timestamp = 1578304294000, recvWindow = 1578303937000 )
pairsdefine specific pairs we want to watch. It supports the vector of pairs
countnumber of trading history of each interested coin
from_idtrading id we want to watch from
end_idthe last trading id we want to watch
orderthe order of the record
sincespecifies the interested time frame of the history
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Gives us the buy history of corresponding coin. We can grab as many as coins we are interested in by passing them as vector.
data.frame
sellHistory()indodax$sellHistory( pairs = "eth_idr", count = 1000, from_id = 0, end_id = 0, order = "desc", since = "2021-03-28 00:00:00", timestamp = 1578304294000, recvWindow = 1578303937000 )
pairsdefine specific pairs we want to watch. It supports the vector of pairs
countnumber of trading history of each interested coin
from_idtrading id we want to watch from
end_idthe last trading id we want to watch
orderthe order of the record
sincespecifies the interested time frame of the history
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Gives us the buy history of corresponding coin. We can grab as many as coins we are interested in by passing them as vector.
data.frame
trade()indodax$trade( pair, type, price, timestamp = 1578304294000, recvWindow = 1578303937000, idr = NULL, val = NULL )
pairdefine specific pairs we want to watch. It supports the vector of pairs
typetype of command to execute (sell or buy)
priceat price should the command will be executed
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
idramount of rupiah(s) that we want to spend to buy the coin(s)
valamount of coin(s) that we want to sell
Function to execute buy and sell. Do not directly execute the function. Use 'sell()' or 'buy()'.
raw data from server
sell()indodax$sell(pair, val, ...)
pairdefine specific pairs we want to watch. It supports the vector of pairs
valamount of coin(s) that we want to sell
Execute sell command.
data_frame
buy()indodax$buy(pair, idr, ...)
pairdefine specific pairs we want to watch. It supports the vector of pairs
idramount of rupiah(s) that we want to spend to buy the coin(s)
Execute buy command.
data_frame
openOrders()indodax$openOrders( pair = NULL, timestamp = 1578304294000, recvWindow = 1578303937000 )
pairdefine specific pairs we want to watch. It supports the vector of pairs
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Execute command to open order position
raw content of the function
orderHistory()indodax$orderHistory( pairs, count = 1000, from = 0, timestamp = 1578304294000, recvWindow = 1578303937000 )
pairsdefine specific pairs we want to watch. It supports the vector of pairs
countnumber of trading history of each interested coin
fromorder id we want to watch from
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Get the details order history opened
raw content of the function
getOrder()indodax$getOrder( pair, order_id, timestamp = 1578304294000, recvWindow = 1578303937000 )
pairdefine specific pair we want to watch. It does not support the vector of pair.
order_idorder_id that we want to check the detail of
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Get the details of a specific order
data.frame
cancelOrder()indodax$cancelOrder( pair, order_id, type, timestamp = 1578304294000, recvWindow = 1578303937000 )
pairdefine specific pair we want to watch. It does not support the vector of pair.
order_idorder_id that we want to check the detail of
typeorder type that we want to cancel (buy or sell)
timestampthe millisecond timestamp of when the request was created and sent
recvWindowthe number of millisecond after timestamp where your request is valid
Cancel specific order id
data.frame
clone()The objects of this class are cloneable with this method.
indodax$clone(deep = FALSE)
deepWhether to make a deep clone.
Suberlin Sinaga (2021)
httr for API management in R
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.