---
title: /getAccounts
slug: getaccounts
createdAt: 2024-01-09T12:30:00.560Z
---

{
  "id": "Ts7AhTVxcShdZ3JhFIFcM",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/getAccounts",
    "servers": [
      {
        "url": "http://1.1.1.1/getAccounts"
      }
    ],
    "name": "",
    "description": "<ul>\n<li>return - all accounts in system and all coins data structure for account</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "accountId",
          "type": "integer",
          "example": 1,
          "description": "the account used in this operation",
          "default": 1
        },
        {
          "kind": "optional",
          "name": "omitBalance",
          "type": "boolean",
          "example": "False",
          "description": "Whether or not to show account's balances",
          "default": "False"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Request data to omit balance information.",
          "customType": "getAccountsRequest",
          "schema": [
            {
              "name": "FunctionData",
              "kind": "optional",
              "type": "object",
              "example": "",
              "schema": [
                {
                  "name": "AccountId",
                  "kind": "optional",
                  "type": "integer",
                  "description": "The ID of the user's account.",
                  "example": 1,
                  "default": 1
                },
                {
                  "name": "OmitBalance",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "A boolean flag to indicate whether to omit balance information.",
                  "example": "true",
                  "default": "true"
                }
              ]
            },
            {
              "name": "Meta",
              "kind": "optional",
              "type": "object",
              "modelRef": "#/components/schemas/MetaTokengetAccounts",
              "customType": "MetaTokengetAccounts",
              "schema": [
                {
                  "name": "FunctionName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The Function to be called",
                  "example": "getAccounts",
                  "default": "getAccounts"
                },
                {
                  "name": "RandomData",
                  "kind": "optional",
                  "type": "string",
                  "description": "Random Data",
                  "example": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
                  "default": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229"
                },
                {
                  "name": "Destination",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of the server",
                  "example": "",
                  "default": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea"
                },
                {
                  "name": "Time",
                  "kind": "optional",
                  "type": "string",
                  "description": "UTC Time of execution",
                  "example": "2021-02-07T18:37:46.948Z",
                  "default": "2021-02-07T18:37:46.948Z"
                },
                {
                  "name": "Source",
                  "kind": "optional",
                  "type": "string",
                  "description": "User public key",
                  "example": "",
                  "default": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99"
                },
                {
                  "name": "AccessToken",
                  "kind": "optional",
                  "type": "string",
                  "description": "Token used for authentication purposes",
                  "example": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087",
                  "default": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/getAccountsRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "name": "FunctionData",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "Accounts",
                    "kind": "optional",
                    "type": "array",
                    "description": "Array with information about every account.",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "AccountDataSignedByCold",
                        "kind": "optional",
                        "type": "object",
                        "description": "Information from the Cold Wallet",
                        "example": "",
                        "schema": [
                          {
                            "name": "Data",
                            "kind": "optional",
                            "type": "object",
                            "example": "",
                            "schema": [
                              {
                                "name": "AccountOwnersData",
                                "kind": "optional",
                                "type": "object",
                                "description": "Information about the account",
                                "example": "",
                                "schema": [
                                  {
                                    "name": "ColdWalletApprovers",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "How many approvers for cold vault transactions",
                                    "example": "0",
                                    "default": "0"
                                  },
                                  {
                                    "name": "ColdWalletApproversAllowedRemote",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "How many remote approvers are allowed for cold vault transactions",
                                    "example": "0",
                                    "default": "0"
                                  },
                                  {
                                    "name": "HotWalletApprovers",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "How many approvers needed for MPC transactions",
                                    "example": "0",
                                    "default": "0"
                                  },
                                  {
                                    "name": "OwnersList",
                                    "kind": "optional",
                                    "type": "array",
                                    "description": "Array with the list of the owner(s)",
                                    "example": "[\"0\"]",
                                    "default": [
                                      "0"
                                    ],
                                    "itemType": "string",
                                    "customType": "string[]",
                                    "itemExample": "",
                                    "itemDefault": ""
                                  }
                                ]
                              },
                              {
                                "name": "Addresses",
                                "kind": "optional",
                                "type": "array",
                                "description": "Array with information on each address from that account",
                                "example": "",
                                "itemType": "object",
                                "customType": "object[]",
                                "schema": [
                                  {
                                    "name": "CoinSymbol",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "The symbol of the coin used in this operation",
                                    "example": "BTC",
                                    "default": "BTC"
                                  },
                                  {
                                    "name": "ColdAddress",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "Cold Wallet address for this crypto",
                                    "example": "35ah48Y3TpfewRfd16fHVPM9x2nhpn3nzC",
                                    "default": "35ah48Y3TpfewRfd16fHVPM9x2nhpn3nzC"
                                  },
                                  {
                                    "name": "HotAddress",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "MPC address for this crypto",
                                    "example": "3KyovSY93WYWMRhWTxMxh23tbGtZbTcSo7",
                                    "default": "3KyovSY93WYWMRhWTxMxh23tbGtZbTcSo7"
                                  }
                                ]
                              },
                              {
                                "name": "Id",
                                "kind": "optional",
                                "type": "integer",
                                "description": "Id of this account",
                                "example": 1,
                                "default": 1
                              },
                              {
                                "name": "NickName",
                                "kind": "optional",
                                "type": "string",
                                "description": "Name of this account",
                                "example": "Main Account",
                                "default": "Main Account"
                              },
                              {
                                "name": "Time",
                                "kind": "optional",
                                "type": "string",
                                "description": "Time when the Cold Wallet signed this message",
                                "example": "2021-02-11 12:54:46.251",
                                "default": "2021-02-11 12:54:46.251"
                              },
                              {
                                "name": "isMultisigAccount",
                                "kind": "optional",
                                "type": "string",
                                "description": "Is this a Multisig Account or not",
                                "example": "false",
                                "default": "false"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "BalancesAndPriceForAccount",
                        "kind": "optional",
                        "type": "array",
                        "description": "Array with information about FIAT Prices and funds",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "schema": [
                          {
                            "name": "CoinPrice",
                            "kind": "optional",
                            "type": "string",
                            "description": "Value of this coin in FIAT",
                            "example": "46164.968030123",
                            "default": "46164.968030123"
                          },
                          {
                            "name": "CoinSymbol",
                            "kind": "optional",
                            "type": "string",
                            "description": "The symbol of the coin used in this operation",
                            "example": "BTC",
                            "default": "BTC"
                          },
                          {
                            "name": "ColdFunds",
                            "kind": "optional",
                            "type": "string",
                            "description": "Cold vault funds in crypto for this coin",
                            "example": "599998832",
                            "default": "599998832"
                          },
                          {
                            "name": "HotFunds",
                            "kind": "optional",
                            "type": "string",
                            "description": "MPC funds in crypto for this coin",
                            "example": "1000",
                            "default": "1000"
                          }
                        ]
                      },
                      {
                        "name": "isConnectedByUserGroup",
                        "kind": "optional",
                        "type": "string",
                        "description": "Is the user in a group that has access to this account?",
                        "example": "true",
                        "default": "true"
                      },
                      {
                        "name": "isOwnedByMe",
                        "kind": "optional",
                        "type": "string",
                        "description": "Is the user running this command the Owner?",
                        "example": "false",
                        "default": "false"
                      },
                      {
                        "name": "IsAccountEndpointAccount",
                        "kind": "optional",
                        "type": "string",
                        "description": "Is the account an endpoint account?",
                        "example": "False",
                        "default": "False"
                      },
                      {
                        "name": "IsStellarRawBytesTransactionAllowed",
                        "kind": "optional",
                        "type": "string",
                        "description": "Is XLM raw bytes transaction allowed?",
                        "example": "false",
                        "default": "false"
                      }
                    ]
                  },
                  {
                    "name": "isUserMultisigApprover(not per account)",
                    "kind": "optional",
                    "type": "string",
                    "description": "Is the requesting user a Multisig approver?",
                    "example": "false",
                    "default": "false"
                  }
                ]
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/getAccounts?accountId=1&omitBalance=False' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"FunctionData\": {\n     \"AccountId\": 1,\n     \"OmitBalance\": \"true\"\n     },\n     \"Meta\": {\n     \"FunctionName\": \"getAccounts\",\n     \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n     \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n     \"Time\": \"2021-02-07T18:37:46.948Z\",\n     \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n     \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"OmitBalance\": \"true\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"getAccounts\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/getAccounts?accountId=1&omitBalance=False\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/getAccounts?accountId=1&omitBalance=False\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"OmitBalance\": \"true\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"getAccounts\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/getAccounts?accountId=1&omitBalance=False\"\n\npayload = json.dumps({\n   \"FunctionData\": {\n      \"AccountId\": 1,\n      \"OmitBalance\": \"true\"\n   },\n   \"Meta\": {\n      \"FunctionName\": \"getAccounts\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"FunctionData\": {\n    \"Accounts\": [\n      {\n        \"AccountDataSignedByCold\": {\n          \"Data\": {\n            \"AccountOwnersData\": {\n              \"ColdWalletApprovers\": \"0\",\n              \"ColdWalletApproversAllowedRemote\": \"0\",\n              \"HotWalletApprovers\": \"0\",\n              \"OwnersList\": [\n                \"\"\n              ]\n            },\n            \"Addresses\": [\n              {\n                \"CoinSymbol\": \"BTC\",\n                \"ColdAddress\": \"35ah48Y3TpfewRfd16fHVPM9x2nhpn3nzC\",\n                \"HotAddress\": \"3KyovSY93WYWMRhWTxMxh23tbGtZbTcSo7\"\n              }\n            ],\n            \"Id\": 1,\n            \"NickName\": \"Main Account\",\n            \"Time\": \"2021-02-11 12:54:46.251\",\n            \"isMultisigAccount\": \"false\"\n          }\n        },\n        \"BalancesAndPriceForAccount\": [\n          {\n            \"CoinPrice\": \"46164.968030123\",\n            \"CoinSymbol\": \"BTC\",\n            \"ColdFunds\": \"599998832\",\n            \"HotFunds\": \"1000\"\n          }\n        ],\n        \"isConnectedByUserGroup\": \"true\",\n        \"isOwnedByMe\": \"false\",\n        \"IsAccountEndpointAccount\": \"False\",\n        \"IsStellarRawBytesTransactionAllowed\": \"false\"\n      }\n    ],\n    \"isUserMultisigApprover(not per account)\": \"false\"\n  },\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "-sO_z0OT2Lwiv7OZGlnHS",
      "type": "bulleted-list",
      "children": [
        {
          "id": "ums5cUpDBuZLQXTFjuO3O",
          "type": "list-item",
          "children": [
            {
              "id": "Dw5x6Fpx6XgLg-ofu4apd",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return - all accounts in system and all coins data structure for account",
                  "id": "WC242uXq3hUtq4mijuvWx"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}