2. Generate Your API Credentials

Prerequisites

To generate API credentials, you must enable Two-Factor Authentication (2FA), a security process to protect your credentials and resources more robustly. With 2FA, you need to provide two authentication factors to verify yourself: password and security token.

To add this additional layer of security to the authentication process, you need to install an application on your mobile phone that generates new security tokens every 30 seconds. Download Authy or the appropriate version of Google Authenticator for your phone.

To initiate the process:

  1. Log into your Juno account.
  2. Click Settings on the lower corner of the left sidebar menu.
    The Account Settings page appears.
  3. Click the Security tab.
    The Account security data appears.
  4. Click the Enable button on the right side of the 2FA token entry and then Continue.
    The service informs you about downloading the 2FA app.
  5. Click I already have the app when your 2FA app is ready on your mobile phone.
  6. Open the 2FA app on your mobile device and tap the +, add, icon.
  7. Scan the QR code provided to add your account and then Continue.
    The 2FA app shows an entry for your Juno account.
  8. Enter the 6-digit code your 2FA app shows in the Juno account entry to activate the 2FA feature and then Continue.
  9. Copy the recovery code provided, store it in a safe place, and then click Logout to activate 2FA. In case you lose your mobile device or access to the 2FA app, this code enables you to disable 2FA and regain access to your account.

Generating API Credentials

If you have not enabled 2FA in your account, the system prevents you from creating your API key.

Set up your API credentials as follows:

  1. Go to Juno API Keys create. If you're not logged in, then the login screen appears first.
    1. Click Settings on the lower corner of the left sidebar menu.
      The Account Settings page appears.
    2. Click the API Keys tab.
    3. Click the Add new API key button to initiate the creation of your API secret and key.
  2. Enter a name for your API key that helps you to easily identify it.
  3. If you want the API to only validate requests from a list of approved IP addresses (allowlist), enable Restrict use of API addresses. You can have from none up to five addresses in this list.
  4. In Permissions, ensure you toggle all the functionalities you need for your API credentials and restrict receiving addresses if you want. You can add from none to five addresses that can receive MXNB funds. With an empty list of receiving addresses you can transfer funds to any address. However, with a non-empty list, only the ones included can receive funds from your account. For further details on API key permissions, see the section, Notes on Permissions.
  5. Click the button Add to save your credentials. Be ready to provide the 2FA token before getting the credentials.
  6. Ensure you store your API key and secret in a safe place because you need them to sign your API requests. The application displays the secret only once, and no way exists to show the secret again. If you don’t save them, then the fix is creating a new set of credentials. Also, always keep your credentials private; otherwise, you're giving access to your account and funds.
  7. Check the understanding box and click Go back to API setup to view your newly created key. You can edit your API key configuration (permissions and allowlists) if you change your mind later.

📘

How many API keys can I have?

You can configure up to six keys in your Juno account.

Notes on Permissions

API Key Permissions are Juno's implementation of AuthZ (authorization). They determine what your API credentials can do:

  • Place orders: Enables placing limit and market orders to buy or sell assets. It includes retrieving a list of your trades and open orders.
  • View balances: Enables retrieving your account balance.
  • View account information: Enables retrieving your account details, such as account status, CLABEs, registered bank and blockchain accounts, funding details, transaction details, and account limits. It also enables creating CLABEs.
  • Perform security actions: Enables modifying your account settings. It includes deactivating your account or blocking withdrawals.
  • Make withdrawals: Enables transferring fiat or crypto funds from your Juno account, such as in withdrawals and redemptions. When you activate this permission, you can leverage your withdrawal security by adding up to five destination addresses to which your API key can complete withdrawals. Only the addresses listed can receive withdrawals from your account. An empty list means any address can receive funds.