Add new request ProtoOAOwnCtidAccessTokenReq
Add new request ProtoOAOwnCtidAccessTokenReq
01 Jul 2024, 15:56
When using Open API to trade on your own account, you still need to use redirect URI logic using your own CTID and receive access and refresh tokens. The refresh token is replaced with a new one after you use it in the ProtoOARefreshTokenReq, which makes it complicated to use Open API to trade using your own accounts.
It would be much easier if there were a ProtoOAOwnCtidAccessTokenReq method that returns an AccessToken authorized for CTID, which created the app. This would allow traders to trade on their own accounts without all this redirect URI and refresh token:
- ProtoOAApplicationAuthReq → ProtoOAApplicationAuthRes
- ProtoOAOwnCtidAccessTokenReq → ProtoOAOwnCtidAccessTokenRes
- ProtoOAAccountAuthReq → ProtoOAAccountAuthRes
Could you check if it is possible to add it?
Replies
bennn
01 Jul 2024, 18:30
RE: Add new request ProtoOAOwnCtidAccessTokenReq
PanagiotisCharalampous said:
Hi there,
If you are using your own accounts, then you can just obtain your token from the playground. Then you can just refresh the token whenever needed. You don't need to implement any authentication logic in this case.
Best regards,
Panagiotis
When you refresh the token using ProtoOARefreshTokenReq, the old refresh token becomes obsolete. The new one returned in ProtoOARefreshTokenRes.refreshToken.
This means the refresh token is updated at least once a month. You need a way to store the latest refresh token in a centralized place. Otherwise, you can't launch your app from anywhere, e.g., on your PC and on a server or migrate to another server.
@bennn
PanagiotisCharalampous
01 Jul 2024, 18:13
Hi there,
If you are using your own accounts, then you can just obtain your token from the playground. Then you can just refresh the token whenever needed. You don't need to implement any authentication logic in this case.
Best regards,
Panagiotis
@PanagiotisCharalampous