Initial OAuth Params

View as MarkdownOpen in Claude

The OAuth params of standard requests are slightly different than the live session token.

oauth_consumer_key: String. Required
A 9-character string set during your OAuth registration process.

  • Third Party OAuth: This will be provided by Interactive Brokers during the registration process.
  • First Party OAuth: This is saved in the Self Service Portal.

oauth_nonce: String. Required
A random string uniquely generated for each request.

oauth_timestamp: String. Required
Timestamp expressed in seconds since 1/1/1970 00:00:00 GMT. Must be a positive integer and greater than or equal to any timestamp used in previous requests.

oauth_token: String. Required

  • Third Party OAuth: This is received from the Access Token endpoint
  • First Party OAuth: This is generated in the Self Service Portal.

oauth_signature_method: String. Required
The signature method used to sign the request. Only ‘HMAC-SHA256’ is supported.

1oauth_params = {
2 "oauth_consumer_key": consumer_key,
3 "oauth_nonce": hex(random.getrandbits(128))[2:],
4 "oauth_signature_method": "HMAC-SHA256",
5 "oauth_timestamp": str(int(datetime.now().timestamp())),
6 "oauth_token": access_token
7}