{ "cells": [ { "cell_type": "code", "execution_count": 15, "id": "7a3f41bd", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import requests\n", "from datetime import datetime" ] }, { "cell_type": "code", "execution_count": 44, "id": "3b48e1ce", "metadata": {}, "outputs": [], "source": [ "mexc_all_tickers = 'https://api.mexc.com/api/v1/contract/ticker'\n", "edgex_all_tickers = 'https://pro.edgex.exchange/api/v1/public/quote/getTicker/?contractId=10000001'" ] }, { "cell_type": "code", "execution_count": 34, "id": "ab38d984", "metadata": {}, "outputs": [], "source": [ "r = requests.get(mexc_all_tickers)\n", "data = r.json()['data']" ] }, { "cell_type": "code", "execution_count": 49, "id": "2976b377", "metadata": {}, "outputs": [], "source": [ "r = requests.get(edgex_all_tickers)\n", "data = r.json()['data']" ] }, { "cell_type": "code", "execution_count": 4, "id": "1139b1a3", "metadata": {}, "outputs": [], "source": [ "df = pd.DataFrame(data)\n", "df['fundingRate_pct'] = df['fundingRate']*100" ] }, { "cell_type": "code", "execution_count": null, "id": "b00512dc", "metadata": {}, "outputs": [], "source": [ "df_trim = df[['symbol','fundingRate_pct','volume24']].copy()\n", "df_trim = df_trim.loc[df_trim['volume24'] > 10_000]" ] }, { "cell_type": "code", "execution_count": 9, "id": "f7b44068", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
symbolfundingRate_pctvolume24
55DRIFT_USDT-1.13603308466
10RED_USDT-1.1138105826673
157PIXEL_USDT-0.405912415472
105NIL_USDT-0.384631438005
33SUPER_USDT-0.37182469502
............
12PLAY_USDT0.083822168649
414PUMPBTC_USDT0.0913745129
398QQQSTOCK_USDT0.096959485
222GUA_USDT0.099645623
265BROCCOLIF3B_USDT0.16473936939
\n", "

837 rows × 3 columns

\n", "
" ], "text/plain": [ " symbol fundingRate_pct volume24\n", "55 DRIFT_USDT -1.1360 3308466\n", "10 RED_USDT -1.1138 105826673\n", "157 PIXEL_USDT -0.4059 12415472\n", "105 NIL_USDT -0.3846 31438005\n", "33 SUPER_USDT -0.3718 2469502\n", ".. ... ... ...\n", "12 PLAY_USDT 0.0838 22168649\n", "414 PUMPBTC_USDT 0.0913 745129\n", "398 QQQSTOCK_USDT 0.0969 59485\n", "222 GUA_USDT 0.0996 45623\n", "265 BROCCOLIF3B_USDT 0.1647 3936939\n", "\n", "[837 rows x 3 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_trim.sort_values('fundingRate_pct', ascending=True)" ] }, { "cell_type": "code", "execution_count": 4, "id": "6775a03f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1775583908" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "round(datetime.now().timestamp())" ] }, { "cell_type": "code", "execution_count": null, "id": "edca3b9f", "metadata": {}, "outputs": [], "source": [ "### PRIVATE API ###\n" ] }, { "cell_type": "code", "execution_count": null, "id": "51e50e0d", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "21aabf30", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "f91b1c04", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "71e551f4", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "py_313", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.12" } }, "nbformat": 4, "nbformat_minor": 5 }