Request rate limitations of orders, positions and getting list of positions, list of orders and etc. in tradovate API

How many requests I can send to tradovate API for such kind of information. I want to implement an algorithm and I need to check them every one second. However, I get the 429 status code which shows the limitation penalty as mentioned in tradovate API guides. Does anybody know the exact rate of requests that tradovate API provides?

You’ll need to use a websocket to check data that frequently. Check out our new FAQ repo for more details:

Do I need to use websocket.send("position/list\n3") at each second or I should subscribe to get the information (e.g, for positions’ information)? I know that it is possible to subscribe to chart data and the server automatically sends back real-time data without sending additional requests. However, for getting positions’ information it is possible to use the same strategy or I should send websocket.send("position/list\n3") at each second? If I need to send the request at each second, is the penalty applied again?

Use the user/syncrequest endpoint. Then you’ll listen for objects with this schema:

{
    e: 'props',
    d: {
        entityType: 'position',
        event: 'Created' | 'Updated',
        entity: {
            id: number,
            accountId: number,
            contractId: number,
            timestamp: string,
            tradeDate: object,
            netPos: number,
            netPrice: number,
            bought: number,
            boughtValue: number,
            sold: number,
            soldValue: number,
            prevPos: number,
            prevPrice: number            
        }
    }
}

This way, anytime your position is changed, you’ll get an update. You shouldn’t need to make more requests because it will notify your websocket client on every change. If you do keep making requests at that rate you will hit the time penalty still.

P.S. Here’s every type of entity that the user syncrequest can send you. Whenever any of these is created or updated you’ll receive a message about it via the real-time subscription started with the socket.

const EntityType = {
    Position:           'position',
    CashBalance:        'cashBalance',
    Account:            'account',
    MarginSnapshot:     'marginSnapshot',
    Currency:           'currency',
    FillPair:           'fillPair',
    Order:              'order',
    Contract:           'contract',
    ContractMaturity:   'contractMaturity',
    Product:            'product',
    Exchange:           'exchange',
    Command:            'command',
    CommandReport:      'commandReport',
    ExecutionReport:    'executionReport',
    OrderVersion:       'orderVersion',
    Fill:               'fill', 
    OrderStrategy:      'orderStrategy',
    OrderStrategyLink:  'orderStrategyLink',
    ContractGroup:      'contractGroup'
}
1 Like

Thanks for this! I’d also like to add “currencyRate”, “userDevice”, “OtherEnvAdminAlertSignal”, “marketDataSubscription”, “userSessionStats”, “productMargin”, and “contractMargin” to the possible entityTypes you’ve listed, from my own experiences with the event messages.

Is it safe to assume any API resource with the .../item type could be updated with an event message?