Title: how can i get secret key for subacount? · Issue #175 · gateio/gateapi-python · GitHub
Open Graph Title: how can i get secret key for subacount? · Issue #175 · gateio/gateapi-python
X Title: how can i get secret key for subacount? · Issue #175 · gateio/gateapi-python
Description: after creating access keys to the sub account, you need to get the deposit address is it possible to get the sub account replenishment address through the main account keys? `import gate_api import os from gate_api.exceptions import ApiE...
Open Graph Description: after creating access keys to the sub account, you need to get the deposit address is it possible to get the sub account replenishment address through the main account keys? `import gate_api import...
X Description: after creating access keys to the sub account, you need to get the deposit address is it possible to get the sub account replenishment address through the main account keys? `import gate_api import...
Opengraph URL: https://github.com/gateio/gateapi-python/issues/175
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"how can i get secret key for subacount?","articleBody":"after creating access keys to the sub account, you need to get the deposit address\n\nis it possible to get the sub account replenishment address through the main account keys?\n\n`import gate_api\nimport os\nfrom gate_api.exceptions import ApiException, GateApiException\nfrom dotenv import load_dotenv\n\nload_dotenv()\n\nAPI_KEY = os.getenv(\"GATE_API_KEY\")\nAPI_SECRET = os.getenv(\"GATE_API_SECRET\")\n\nconfiguration = gate_api.Configuration(key=API_KEY, secret=API_SECRET)\napi_client = gate_api.ApiClient(configuration)\n\nsub_account_api = gate_api.SubAccountApi(api_client)\n\ntoken = \"TON\"\nnetwork = \"TON\"\n\ntry:\nsub_accounts = sub_account_api.list_sub_accounts()\nfor sub_account in sub_accounts:\napi_keys = sub_account_api.list_sub_account_keys(sub_account.user_id)\napi_keys = sub_account_api.get_sub_account_key(sub_account.user_id,key=\"some key\")\nif not api_keys:\nsub_account_key = gate_api.SubAccountKey(ip_whitelist=[\"176.110.0.0/16\"])\napi_keys = sub_account_api.create_sub_account_keys(\nsub_account.user_id, sub_account_key\n)\nprint(f\"Created API key for Sub Account: {sub_account.login_name}\")\n\n for api_key in api_keys:\n\n sub_configuration = gate_api.Configuration(\n key=api_key.key, secret=????? - HOW CAN I GET SECRET KEY SUBACCOUNT?\n )\n sub_api_client = gate_api.ApiClient(sub_configuration)\n sub_wallet_api = gate_api.WalletApi(sub_api_client)\n\n\n deposit_address = sub_wallet_api.get_deposit_address(currency=token)\n print(\n f\"Sub Account: {sub_account.user_id}, Deposit Address for {token} on {network}: {deposit_address.address}\"\n )\nexcept GateApiException as e:\nprint(f\"Gate API Exception: {e}\")\nexcept ApiException as e:\nprint(f\"API Exception: {e}\")`","author":{"url":"https://github.com/devdjangoreact","@type":"Person","name":"devdjangoreact"},"datePublished":"2025-02-18T16:33:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/175/gateapi-python/issues/175"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c4683ec8-2d17-ee73-1734-40006a6dee85 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4D4:1B74C:DC97EB:11795A2:698FE94D |
| html-safe-nonce | 2f56197e0cf781c8da872a65e32dddef013d8e67290da121e7d8ae93f201ea9f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEQ0OjFCNzRDOkRDOTdFQjoxMTc5NUEyOjY5OEZFOTREIiwidmlzaXRvcl9pZCI6IjQ2Nzk1NjM0MDg0NjY1MDQwMTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9c7af080cc03a3be5f91258efc008fd15216b70dc6d6173dab10290daf5c7c94 |
| hovercard-subject-tag | issue:2860997610 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gateio/gateapi-python/175/issue_layout |
| twitter:image | https://opengraph.githubassets.com/953b50e488bff245351da712ebe4aef79283772d742d0523c6997bdc7d705c66/gateio/gateapi-python/issues/175 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/953b50e488bff245351da712ebe4aef79283772d742d0523c6997bdc7d705c66/gateio/gateapi-python/issues/175 |
| og:image:alt | after creating access keys to the sub account, you need to get the deposit address is it possible to get the sub account replenishment address through the main account keys? `import gate_api import... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devdjangoreact |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/gateio/gateapi-python git https://github.com/gateio/gateapi-python.git |
| octolytics-dimension-user_id | 32661171 |
| octolytics-dimension-user_login | gateio |
| octolytics-dimension-repository_id | 163492316 |
| octolytics-dimension-repository_nwo | gateio/gateapi-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 163492316 |
| octolytics-dimension-repository_network_root_nwo | gateio/gateapi-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width