Convert

RFQ quote

Please refer to the official Phemex API Docs for the Required parameters.

https://phemex-docs.github.io#rfq-quote

Function Name:

rfqQuote()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function rfqQuote(exchange, options) {
    try {
        let result = await exchange.rfqQuote(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await rfqQuote(myMainPhemexExchange, {
        fromCurrency: "BTC",
        toCurrency: "USD",
        fromAmountEv: "1"
     });

Convert

Please refer to the official Phemex API Docs for the Required parameters.

https://phemex-docs.github.io#convert

Function Name:

convert()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function convert(exchange, options) {
    try {
        let result = await exchange.convert(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await convert(myMainPhemexExchange, {
        fromCurrency: "BTC",
        toCurrency: "USD",
        fromAmountEv: "1",
         code: "GK5LG755LVQYCJUWL3MESRZF3D7T67JIZJEOPNY3RBBCOF2W65DFIJXSEOT3EJTHE33NIN2XE4TFNZRXSIR2EJBFIQZCFQRHI32DOVZHEZLOMN4SEORCKVJUIIRMEJXXE2LHNFXCEORRFQRHA4TJMNSSEORCGAXDAMBQGAYDAMBQEIWCE4DSNFRWKUZYEI5DALBCOBZGSY3FIZXXEQ3BNRRSEORQIUWTEMRMEJYHE33DMVSWI4ZCHIRDALRQGAYDAMBQGAYCELBCOBZG6Y3FMVSHGRLWEI5DALBCMNXW45TFOJZWS33OIZSWKSLUMVWXGIR2PMRGG33OOZSXE43JN5XEMZLFKJ2WYZLTEI5FWISEIVDECVKMKRPUMRKFL5LUQRKOL5HE6X2NIFKEGSBCLUWCE5DPORQWYRTFMVJGC5DFEI5DALRQGAZSYITUN52GC3CGMVSUK5RCHIYSYITCMFZWKRTFMVJGC5DFEI5DALRQGAYTKMBQFQRGEYLTMVDGKZKFOYRDUMBMEJTXEYLEOVQWYRTFMVJGC5DFEI5G45LMNQWCEZ3SMFSHKYLMIZSWKRLWEI5DALBCOBSW4YLMOR4UMZLFKJQXIZJCHJXHK3DMFQRHAZLOMFWHI6KGMVSUK5RCHIYCYITXNBUXIZKMNFZXIRTFMVJGC5DFEI5G45LMNQWCE53INF2GKTDJON2EMZLFIV3CEORQFQRGIZLGMF2WY5CGMVSVEYLUMURDUMBOGAYDGLBCMRSWMYLVNR2EMZLFIV3CEORQFQRHI2DJOJSFAYLSOR4UMZLFKJQXIZJCHJXHK3DMFQRHI2DJOJSFAYLSOR4UMZLFIV3CEORQPUWCE5DJMNVUS3TGN4RDU6ZCOBZGSY3FEI5DGMBYHE3TKOBQGQWCE43DMFWGKIR2GQWCE5DJNVSXG5DBNVYCEORRGY4TQMBXGYZDINZZHA4TQMBSHAZTOLBCORXUEYLTMVBXK4TSMVXGG6JCHJ2HE5LFPUWCE3LPOZSU64BCHIYCYITFPBYGS4TFIF2CEORRGY4TQMBXGYZDKNZQGAZSYITSMVYXKZLTORAXIIR2GE3DSOBQG43DENBZGAYDGLBCOF2W65DFIF2CEORRGY4TQMBXGYZDINZZHA4SYITROVXXIZKJMQRDUMJWHE4DANZWGI2DOOJYHEWCE4LVN52GKUDSNFRWKUZUEI5DGMBYHE3TKOBQGR6SYITVONSXESLEEI5DIOBQG44TSNZMEJRGSZBCHIRCELBCOF2W65DFJNSXSIR2EJRTEMLEGA4DENBNMQYDSNJNGRRGGYZNMFTDIZRNGI3TCYJTHFSWCOBWGM3SE7ML347V3CYBAAAA"
     });

Query convert history

Please refer to the official Phemex API Docs for the Required parameters.

https://phemex-docs.github.io#query-convert-history

Function Name:

getConvertHistory()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function getConvertHistory(exchange, options) {
    try {
        let result = await exchange.getConvertHistory(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getConvertHistory(myMainPhemexExchange, {
 });

Last updated