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)
url
indodax api endpoint
secret
indodax secret API
key
indodax 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)
payload
The post data that will be sent
params
The 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)
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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" )
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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 )
pairs
define specific pairs we want to watch. It supports the vector of pairs
count
number of trading history of each interested coin
from_id
trading id we want to watch from
end_id
the last trading id we want to watch
order
the order of the record
since
specifies the interested time frame of the history
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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 )
pairs
define specific pairs we want to watch. It supports the vector of pairs
count
number of trading history of each interested coin
from_id
trading id we want to watch from
end_id
the last trading id we want to watch
order
the order of the record
since
specifies the interested time frame of the history
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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 )
pairs
define specific pairs we want to watch. It supports the vector of pairs
count
number of trading history of each interested coin
from_id
trading id we want to watch from
end_id
the last trading id we want to watch
order
the order of the record
since
specifies the interested time frame of the history
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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 )
pair
define specific pairs we want to watch. It supports the vector of pairs
type
type of command to execute (sell or buy)
price
at price should the command will be executed
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the number of millisecond after timestamp where your request is valid
idr
amount of rupiah(s) that we want to spend to buy the coin(s)
val
amount 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, ...)
pair
define specific pairs we want to watch. It supports the vector of pairs
val
amount of coin(s) that we want to sell
Execute sell command.
data_frame
buy()
indodax$buy(pair, idr, ...)
pair
define specific pairs we want to watch. It supports the vector of pairs
idr
amount 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 )
pair
define specific pairs we want to watch. It supports the vector of pairs
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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 )
pairs
define specific pairs we want to watch. It supports the vector of pairs
count
number of trading history of each interested coin
from
order id we want to watch from
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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 )
pair
define specific pair we want to watch. It does not support the vector of pair.
order_id
order_id that we want to check the detail of
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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 )
pair
define specific pair we want to watch. It does not support the vector of pair.
order_id
order_id that we want to check the detail of
type
order type that we want to cancel (buy or sell)
timestamp
the millisecond timestamp of when the request was created and sent
recvWindow
the 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)
deep
Whether 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.