Skip to main content

Phemex


Phemex-LogoPhemex-Logo

Connecting Phemex to Tealstreet


API Creation Process

  • First, make sure you are logged into your Phemex account.
note

Consider supporting Tealstreet by using the referral link.

  • Next, log into your Tealstreet account.
    • Depending on when you made your account and when we did the snapshot, you might need to make a new account for v3.
tip

It's a good idea to keep both Tealstreet and Phemex tabs open for the duration of this process.

  • Click the 'Settings' button near the top right corner of the terminal.
Adding API
  • Choose Phemex from the dropdown menu.
TS Dropdown

Phemex API Creation

  • Now you are ready to generate the API Keys within your Phemex Account. Head on over to the Phemex tab and:
    1. Click on the User Icon.
    2. Select 'API Management' from the dropdown menu.

API-Dropdown

tip

You can get to this page directly by navigating here

  • On the API Management page click on the Create new API Key Button to start the key creation process.

API-Create

  • On the Create API pop-up window
    1. Select "High Rate Limit API"
    2. Select next

API-Detailed

  • Now you are ready to choose the settings of your Phemex API Key.

API-Detailed

  • Name’ - You can choose any name you like for this section. It can be helpful to use a name related to Tealstreet in case you have many API keys for different services.
  • Copy the Whitelist IP Addresses supplied by Tealstreet (on the new API key page) and paste them into this field.
  • Choose ‘Read & Trade Permission’.
  • Confirm’ - Once you have completed the required fields, press Confirm.
caution

Never share your API Keys with anyone.


Linking the API to Tealstreet

  • Once you have created the API Key on Phemex’s website, you are ready to link them inside Tealstreet

  • Now lets return to the 'API Keys' page inside the terminal we left open earlier.

API-Tealstreet

  • Click the exchange drop down and select Phemex.
    • Name’ Here you can choose a name for your API Key. This is helpful for traders who utilize multiple exchanges and/or sub accounts and want to easily distinguish between them on the trading terminal page.
    • Choose the Color you want your key to look like inside the terminal
    • Paste the API Key provided by Phemex here.
    • Paste the API Secret provided by Phemex here.
    • Click ‘Add’.

If all the details are correct, you will have successfully linked your Phemex account to Tealstreet. Close the ‘Settings’ window and you will be on the main Trade page with the API key being activated automatically.

  • If properly linked, you will see your balance/collateral appear in the Margin window of Tealstreet.
  • for more information check out our Quick Start Guide.
caution

Phemex requires that an account have performed a single manual trade before their API activates for remote-trading through a terminal.


Supported Markets

Phemex supports 3 margin types for their perpetual markets:

  1. COIN-M: Coin margined (Inverse).

    • BTC margined & ETH margined contracts.
  2. USD-M: Phemex’s USD markets.

    • You must hold USD (not USDT) in your Contract Trading Account to trade USD-M markets on Phemex.
  3. USDT: Phemex' USDT markets.

    • You must hold USDT (not USD) in your Contract Trading Account to trade USDT markets on Phemex.
note
  • Linear Perpetuals use USD or USDT as margin.
  • Inverse Perpetuals use Coin margin (BTC or ETH).
  • For example the BTC Linear Perps are called ‘BTCUSD’ & ‘BTCUSDT’, while the BTC Inverse Perp is called ‘BTCUSD Perp’ See image below:

LinPerp


Getting Phemex USD

Watch this Youtube video from Phemex to learn how to use their crypto convert tool:

Phemex-Connect

note

If you hold USDC or USDT and want to trade Phemex ‘USD-M’ you need to convert the margin to Phemex USD first!


Transferring to Contract account

Once you have either USD, USDT, BTC, or ETH, transfer your preferred balance to the 'Contract Trading Accounts'. Follow the instructions below to transfer margin from the Spot wallet to the Contract Trading Wallet.

The steps to do this are:

  1. bring up the Assets menu
  2. Click 'Transfer'
  3. Select the margin type you wish to transfer. (e.g., USD)
  4. Ensure the locations for the transfer (e.g., Spot to Contract Trading)
  5. Input the desired amount of margin to transfer (e.g., $100, All)
  6. Click 'Confirm'

Transfer

Transfer


Troubleshooting

API Stuck loading

danger

Having trouble loading your Phemex API in Tealstreet? such as a spinning wheel when trying to place an order?

  1. Make sure the Phemex account has completed at least one trade to generate history & unlock the API
  2. Ensure you are using a supported market. (Spot for example isn't supported)
  3. If you have issues, please contact us.

Zero Balance

Tealstreet 'Margin Wallet' not showing any balance?

  1. Confirm you hold the appropriate margin in your 'Contract Trading Account' on Phemex.

  2. Confirm you have the appropriate market open in Tealstreet.

    • If you hold Phemex USD and want to trade BTC go to 'BTCUSD' Linear.
    • If you hold BTC and want to trade BTC margined contracts, go to 'BTCUSD' Inverse.
    • if you hold ETH and want to trade ETH margined contracts, go to 'cETHUSD' Inverse.

Can't place stoploss orders

  • Phemex requires you to have an active position to be able to place stoplosses. This is a limitation of the exchange engine.

Getting a message about API Validated but IP is unrestricted?

  • Please ensure you have followed the documentation, in particular did you create a "High rate limit" API Key? or a default?
    • Are you trying to connect to the testnet? or the mainnet? At this time testnet support is provided on a best-effort basis and may not be working correctly.

Other API Issues

  1. Double check that you did not confuse the API Key and the API Secret.
  2. Ensure you correctly whitelisted all IP Addresses listed in the terminal, shown in the 'New API Key - Phemex' window.