SnapTrade · Schema

encryptedResponse

This response consists of 2 different components that must be decrypted to obtain the decrypted message * Decrypting the encryptedSharedKey The encrypted shared key is a shared key that was randomly generated by SnapTrade and encrypted using the users SSH public key provided when registering the user It is needed to decrypt the message in step 2. To decrypt the shared key, the user should have access to their SSH private key stored locally in their device An example Python code on how to decrypt the shared key is shown below ``` def decrypt_rsa_message(self, encrypted_message): from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA from base64 import b64decode f = open('private.pem', 'r') private_key = RSA.import_key(f.read()) cipher = PKCS1_OAEP.new(private_key) return cipher.decrypt(b64decode(encrypted_message.encode())).decode() ``` * Decrypting the encryptedMessageData The data meant to be returned by an endpoint can be obtained by decrypting the encrypted message An encrypted message is a message that is encrypted using AES - MODE OCB with the shared key obtained in step one An example code to decrypt the encrypted message is shown below ``` def decrypt_aes_message(self, shared_key, encrypted_message): from Crypto.Cipher import AES from base64 import b64decode encrypted_msg = b64decode(encrypted_message["encryptedMessage"].encode()) tag = b64decode(encrypted_message["tag"].encode()) nonce = b64decode(encrypted_message["nonce"].encode()) cipher = AES.new(shared_key.encode(), AES.MODE_OCB, nonce=nonce) return cipher.decrypt_and_verify(encrypted_msg, tag).decode() ```

CompanyFintechBrokerageTrading

Properties

Name Type Description
encryptedSharedKey string
encryptedMessageData object
View JSON Schema on GitHub

JSON Schema

snaptrade-encrypted-response-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/snaptrade/main/json-schema/snaptrade-encrypted-response-schema.json",
  "title": "encryptedResponse",
  "description": "This response consists of 2 different components that must be decrypted to obtain the decrypted message\n\n* Decrypting the encryptedSharedKey\n\n  The encrypted shared key is a shared key that was randomly generated by SnapTrade and encrypted using the users SSH public key provided when registering the user\n  It is needed to decrypt the message in step 2.\n\n  To decrypt the shared key, the user should have access to their SSH private key stored locally in their device\n\n  An example Python code on how to decrypt the shared key is shown below\n\n  ```\n  def decrypt_rsa_message(self, encrypted_message):\n      from Crypto.Cipher import PKCS1_OAEP\n      from Crypto.PublicKey import RSA\n      from base64 import b64decode\n\n      f = open('private.pem', 'r')\n      private_key = RSA.import_key(f.read())\n      cipher = PKCS1_OAEP.new(private_key)\n\n      return cipher.decrypt(b64decode(encrypted_message.encode())).decode()\n  ```\n\n* Decrypting the encryptedMessageData\n\n   The data meant to be returned by an endpoint can be obtained by decrypting the encrypted message\n\n   An encrypted message is a message that is encrypted using AES - MODE OCB with the shared key obtained in step one\n\n  An example code to decrypt the encrypted message is shown below\n\n  ```\n  def decrypt_aes_message(self, shared_key, encrypted_message):\n      from Crypto.Cipher import AES\n      from base64 import b64decode\n\n      encrypted_msg = b64decode(encrypted_message[\"encryptedMessage\"].encode())\n      tag = b64decode(encrypted_message[\"tag\"].encode())\n      nonce = b64decode(encrypted_message[\"nonce\"].encode())\n      cipher = AES.new(shared_key.encode(), AES.MODE_OCB, nonce=nonce)\n\n      return cipher.decrypt_and_verify(encrypted_msg, tag).decode()\n  ```\n",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snaptrade-openapi.yml#/components/schemas/encryptedResponse",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "encryptedSharedKey": {
      "type": "string"
    },
    "encryptedMessageData": {
      "type": "object",
      "properties": {
        "encryptedMessage": {
          "type": "string"
        },
        "tag": {
          "type": "string"
        },
        "nonce": {
          "type": "string"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/snaptrade-encrypted-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.