Skip to main content

Phemex


Phemex-LogoPhemex-Logo

Connecting Phemex to Tealstreet

You can follow along in the video or the steps below:

Phemex-Connect

Watch the video Tutorial on YouTube. Click Here.


API Creation Process

tip

Its a good idea to keep both Tealstreet and Phemex tabs open when actively managing positions.

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

  • next, log into your Tealstreet account.

    1. Once you have successfully logged into Tealstreet, navigate to the header titled 'API Keys'

    2. Click the blue button titled 'New API Key'

addingapi

  • Choose Phemex from the dropdown menu.

dropdown

  • Leave the New API window open on Tealstreet as we will need the IP Addresses from it for this next part of the API Creation process

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

  1. ‘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.
  2. Copy the Whitelist IP Addresses supplied by Tealstreet (on the new API key page) and paste them into this field.
  3. Choose ‘Read & Trade Permission’.
  4. ‘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 fill out the information on Tealstreet’s 'API KEYS' page.

  • 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.

    1. ‘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.

    2. Choose your Encryption Password. Remember to save this somewhere! You will need to input this password when you navigate back to the trade page of the trading terminal.

    3. Paste the API Key provided by Phemex here.

    4. Paste the API Secret provided by Phemex here.

    5. Click ‘Create’.

  • If all the details are correct, you will have successfully linked your Phemex account to Tealstreet. Navigate to the ‘Trade’ page of Tealstreet and select the Phemex account from the dropdown menu (usually located near the top right).

    • If properly linked, you will see your balance/collateral appear in the Margin window of Tealstreet.
caution

Phemex requires that an account have performed a single manual trade before theyre 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

USDT pairs support was added as of the Tealstreet 2.0 upgrade.

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.
  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.
Troubleshooting IP Whitelist