Learn R Programming

tcsinvest (version 0.1.1)

marketOrder: Place market order

Description

this function will place your order in to account.

Usage

marketOrder(token = "", live = FALSE, figi = "", direction = NULL, lots = NULL)

Arguments

token

token from Tinkoff account

live

live trading - TRUE or sandbox (paper) trading - FALSE (default)

figi

internal tinkoff code for instrument

direction

"Buy" or "Sell"

lots

number of lots to buy

Value

returns a list object containing the information about state of operation.

Details

As described by the official Tinkoff Investments documentation. If you want live trading, use sandbox=FALSE with live token

See Also

limitOrder

Examples

Run this code
# NOT RUN {
paper_token = 'your_sandbox_token_from_tcs_account'
marketOrder(paper_token,figi='BBG005HLTYH9',direction='Buy',lots=1)

live_token = 'your_live_token_from_tcs_account'
# remember that this command will place limit order in your live account !
marketOrder(live_token,live=TRUE,figi='BBG005HLTYH9',direction='Buy',lots=1)
# }

Run the code above in your browser using DataLab