{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "7a3f41bd", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import requests" ] }, { "cell_type": "code", "execution_count": 3, "id": "3b48e1ce", "metadata": {}, "outputs": [], "source": [ "url_all_tickers = 'https://api.mexc.com/api/v1/contract/ticker'" ] }, { "cell_type": "code", "execution_count": 10, "id": "ab38d984", "metadata": {}, "outputs": [], "source": [ "r = requests.get(url_all_tickers)\n", "data = r.json()['data']" ] }, { "cell_type": "code", "execution_count": 21, "id": "1139b1a3", "metadata": {}, "outputs": [], "source": [ "df = pd.DataFrame(data)\n", "df['fundingRate_pct'] = df['fundingRate']*100" ] }, { "cell_type": "code", "execution_count": 22, "id": "b00512dc", "metadata": {}, "outputs": [], "source": [ "df_trim = df[['symbol','fundingRate_pct','volume24']].copy()\n", "df_trim = df_trim.loc[df_trim['volume24'] > 10_000]\n" ] }, { "cell_type": "code", "execution_count": 23, "id": "43b053d0", "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
0BTC_USDT-0.0007208341522
1ETH_USDT0.001227134917
2XAUT_USDT0.0050429520428
3SOL_USDT-0.0016188591783
4SILVER_USDT0.0000634682239
............
837ENS_USDC0.0100196467
838KAITO_USDC-0.0106245467
839BIO_USDC0.0050586982
840ETC_USDC0.0100117338
841MNT_USDC0.0100150912
\n", "

837 rows × 3 columns

\n", "
" ], "text/plain": [ " symbol fundingRate_pct volume24\n", "0 BTC_USDT -0.0007 208341522\n", "1 ETH_USDT 0.0012 27134917\n", "2 XAUT_USDT 0.0050 429520428\n", "3 SOL_USDT -0.0016 188591783\n", "4 SILVER_USDT 0.0000 634682239\n", ".. ... ... ...\n", "837 ENS_USDC 0.0100 196467\n", "838 KAITO_USDC -0.0106 245467\n", "839 BIO_USDC 0.0050 586982\n", "840 ETC_USDC 0.0100 117338\n", "841 MNT_USDC 0.0100 150912\n", "\n", "[837 rows x 3 columns]" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_trim" ] }, { "cell_type": "code", "execution_count": null, "id": "f7b44068", "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 }