Access Token in Replay model is 404

I try use Replay model,But I found I call

get 404 ,and body is empty
so I only can user “live” or “demo” host

it good to get access token,
and I can user the token of demo host to login marker (with market token) and trade (with access token) socket by wss host:


but I can not get account list endpoint by account/list it return 404 and empty body

but it can call back in demo and live host,but It just return demo or live account
I need get the Replay account info ,for place order.
from this link access denied in replay
I think I get the demo account to send order in Replay,so I get access denied, but I can not login in replay host and get replay account.
Please help me @Alexander

OK I think this might help you solve your other issues you’ve been having as well.

You need to use a WebSocket for replay mode. All the requests that you will send will have to go through the replay socket. So when you want to place an order, you compose a message string to send via WebSocket like so order/placeorder\n{id}\n\n{requestBodyString}.

To authorize the WebSocket, you’ll need an accessToken from one of the standard HTTPS endpoints (, You send the auth message when you receive the ‘open’ frame (sent as 'o' to your client WebSocket). The auth message looks like this: authorize\n{id}\n\n{accessToken}

You mentioned you’re using Java, you’ll need to use a Java WebSocket client most likely as well, but I know that these exist so it should be no issue.

Typically the flow for a WebSocket is this:

  • send HTTP request to get an access token from demo or live environment.
  • instantiate a WebSocket. There are three distinct WebSocket servers that you can listen to:
    • wss:// for real time user data,
    • wss:// for market data, and
    • wss:// for market replay.
  • upon connection, the server will respond with an open frame 'o'. Immediately, send the auth message described in my last response.
  • you should receive a response with { s: 200, ... } if the response succeeded.
  • if you’re specifically using replay, you send all of your requests through the replay socket (for charts, real time data subscriptions, and requests).

OK ,I think I need user websocket of Replay to get Account info,I will try it

If you want to get any details about the replay session itself, you can compose a message much like an HTTP message and send it. All the standard entity messages are valid. So if you want to know about the account that you were assigned for the replay session, you can send account/list\n{id}\n\n\n over the replay socket connection using the Socket’s .send method. Also note that you need the newlines in our WebSocket message protocol. You should receive a message like this: a[{"s":200,"i":2,"d":[{...accounts}]}. You can get more details about using WebSockets here.

Thank you very much @Alexander ,I use the replay websocket to get account It return back the RPL user like this json

    "id": 5xx3,
    "name": "RPL3xxxx0-5",
    "userId": 3xxxx0,
    "accountType": "Customer",
    "active": false,
    "clearingHouseId": 2,
    "riskCategoryId": 11,
    "autoLiqProfileId": 1,
    "marginAccountType": "Speculator",
    "legalStatus": "Individual",
    "archived": false,
    "timestamp": "2022-04-23 19:36:57"

but I send a markert buy order with param:

    "action": "Buy",
    "symbol": "MNQM2",
    "orderQty": 1,
    "orderType": "Market",
    "accountSpec": "RPL3xxxx0-5",
    "accountId": 1xxx6,
    "timeInForce": "Day",
    "automated": true

now I can see the active is false, but I do not what is the problem.
I send by websocket with data:



but it return back:

    "failureReason": "UnknownReason",
    "failureText": "Request Timeout, error id: fa045e10-4b45-455f-9885-d010d7fef968"

it return quickly,I do not know where case the timeout.
It can work ok in demo(I still not try in live)

another question:
I see doc about Replay,It say only hold one replay session,I first init Replay model in TR client, for example replay start time 2022-04-22 12:00:00 UTC,my program start Replay model without init clock,after build the replay and marker session,the market data of replay model get is the same with TR client time, but the account is not the same
the client account name is RPL3xxxx0-33

but get account by websocket in proglam is RPL33XXX90-5

and I still can not send order in my program, but I can send order good in TR client,and my program can recevie the trade prop event good.

and I initclock in proglram ,is return a new account ,like RPL33XXX90-34 ,but it send order fail,with TimeOut

Each time you use initializeClock it will start a new replay session. Each replay session has a unique environment created for just that one session. When you start a new one, the old session will be forgotten. You can’t watch the replay via Trader UI and run a replay via API and interoperate on them. You could run them both, even over the same time frame, but they would be unique sessions and couldn’t communicate with one another.

Thanks,I know ,But I my Replay session,It can not send order ,with the response

    "failureReason": "UnknownReason",
    "failureText": "Request Timeout, error id: fa045e10-4b45-455f-9885-d010d7fef968"

what reason may be?

Can you make a new request please and give the error id again with the timestamp when you made the request?