Cover image
Try Now
2025-04-14

该存储库通过MCP(模型上下文协议)服务器提供了BITPIN加密货币交换API的全面实现。

3 years

Works with Finder

4

Github Watches

1

Github Forks

4

Github Stars

Build Status

Bitpin Exchange MCP Server Tools

This repository provides an MCP server implementation for the Bitpin cryptocurrency exchange. The server exposes several tools for interacting with the Bitpin API, such as retrieving wallet balances, market data, order details, and executing various types of orders like limit orders, market orders, stop-limit orders, and OCO (One Cancels the Other) orders.

📺 Demo

Check out a live demo of the Bitpin MCP Server in action, showcasing LLM-powered crypto trading:

Watch the demo

Features

The MCP server provides the following tools:

  • GetWalletsListAsync: Retrieve a list of wallet balances for various cryptocurrencies.
  • GetMarketsListAsync: Retrieve a list of all supported trading markets.
  • GetTickersListAsync: Retrieve the current price list of Bitpin's markets.
  • GetCurrenciesAsync: Retrieve a list of supported cryptocurrencies with details such as symbol, name, and tradability status.
  • GetOrderbooksAsync: Retrieve the open orders in a specific trading market.
  • GetMatchesAsync: Retrieve the latest executed trades for a specific market.
  • CreateLimitOrderAsync: Place a limit order to buy or sell a cryptocurrency at a specified price.
  • CreateMarketOrderAsync: Place a market order to instantly buy or sell at the best available price.
  • CreateStopLimitOrderAsync: Place a stop-limit order to buy or sell once a specific stop price is reached.
  • CreateOcoOrderAsync: Place an OCO (One Cancels the Other) order to manage both limit and stop-limit orders simultaneously.
  • GetOrdersAsync: Retrieve your list of orders.
  • GetCompeletedOrdersAsync: Retrieve details of your completed orders (executed trades).
  • GetOrderByIdAsync: Retrieve a specific order by its order ID.
  • CancelOrderByIdAsync: Cancel a specific order by its order ID.

Prerequisites

  • .NET 9 or higher
  • The BitpinClient NuGet package
  • Access to the Bitpin API (API Key and Secret)

Setting Up the Server

  1. Install Dependencies
    Ensure that your project references the required BitpinClient package and all necessary dependencies for MCP server tools.

  2. Configure Bitpin API Settings
    Set up your API Key and Secret for the Bitpin API in the BitpinClientSettings:

    var settings = new BitpinClientSettings()
    {
        Key = "****",  // Replace with your Bitpin API Key
        Secret = "****",  // Replace with your Bitpin API Secret
    };
    
  3. MCP Server Configuration
    Add the MCP server configuration to your application settings:

     {
         "mcpServers": {
             "BitpinExchange": {
                 "command": "dotnet",
                 "args": [
                     "run",
                     "--project",
                     "D:\\projects\\bitpin-mcp-server\\src\\MCPServer\\MCPServer.csproj",
                     "--no-build"
                 ],
                 "env": {
                     "BITPIN_API_KEY": "****",
                     "BITPIN_API_SECRET": "****",
                     "BITPIN_API_URL": "https://api.bitpin.org/api/v1/"
                 }
             }
         }
     }
    
  4. Configure Services in Program.cs

    Use the following configuration to add the BitpinClient service and set up the MCP server:

    using BitpinClient;
    using Microsoft.Extensions.DependencyInjection;
    using Microsoft.Extensions.Hosting;
    
    var builder = Host.CreateEmptyApplicationBuilder(settings: null);
    
    var settings = new BitpinClientSettings()
    {
        Key = "****", // Replace with your API Key
        Secret = "****", // Replace with your API Secret
    };
    
    builder.Services.AddBitpinClient(settings);
    
    builder.Services.AddMcpServer()
        .WithStdioServerTransport()
        .WithToolsFromAssembly();
    
    var app = builder.Build();
    
    await app.RunAsync();
    

Testing

The project includes comprehensive unit tests to ensure the reliability of the Bitpin client integration. The tests are organized into several categories:

  • MarketData: Tests for retrieving market information, tickers, orderbooks, and currency data
  • Authentication: Tests for token retrieval and refresh functionality
  • UserData: Tests for retrieving user wallet information
  • OrderManagement: Tests for retrieving, canceling, and managing orders
  • OrderCreation: Tests for creating different types of orders (limit, market, stop-limit, OCO)
  • ErrorHandling: Tests for proper handling of error conditions

Running the Tests

To run the tests, use the following command:

dotnet test

To run tests from a specific category:

dotnet test --filter "Category=MarketData"

Test Configuration

The tests use a BitpinClientSettings configuration with API keys. For security reasons, these keys are masked in the test code. When running tests locally, replace the placeholder values with your actual API keys.

Note: Some tests that create real orders on the exchange are marked with [Ignore] to prevent accidental execution. These tests should only be run manually and with caution.

Conclusion

This MCP server provides an easy way to integrate with the Bitpin API and interact with your wallets, orders, and markets. You can place orders, retrieve market data, and manage your assets efficiently using these tools.

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • modelscope
  • 开始以更轻松的方式开始构建具有LLM授权的多代理应用程序。

  • dmayboroda
  • 带有可配置容器的本地对话抹布

  • evilsocket
  • 简单的代理开发套件。

    Reviews

    3.4 (9)
    Avatar
    user_nhXRXXhx
    2025-04-24

    The Bitpin-MCP-Server by Kamyab7 is an impressive tool for managing MCP applications. It's intuitive and reliable, significantly simplifying complex server tasks. Highly recommend it for its efficiency and user-friendly interface.

    Avatar
    user_DNCSmzVW
    2025-04-24

    I've been using the bitpin-mcp-server by Kamyab7, and I must say, it's truly impressive. The server's performance and reliability are top-notch, making it an indispensable tool for my projects. The setup was straightforward, and the support from the creator is excellent. Highly recommended for anyone in need of a robust MCP server.

    Avatar
    user_rjr1LHNC
    2025-04-24

    I've been using the Bitpin-MCP-Server by Kamyab7 and it's fantastic! The setup was smooth and the server runs seamlessly. High performance and reliability make it perfect for my needs. Highly recommend this product to anyone looking for a robust server solution.

    Avatar
    user_AUOTYlTE
    2025-04-24

    As a dedicated user of the bitpin-mcp-server, I can confidently say that this product by Kamyab7 is a game-changer for server management. It offers a seamless experience with its intuitive interface and robust features. The setup process is straightforward, making it accessible for both beginners and advanced users. Overall, it's a reliable and efficient tool for anyone looking to optimize their server operations. Highly recommended!

    Avatar
    user_1Td4o32r
    2025-04-24

    Bitpin-mcp-server by Kamyab7 is a revolutionary tool for managing and controlling multiple servers seamlessly. As a loyal user, I am impressed by its efficiency and reliability. The user-friendly interface and robust features make server management effortless. Highly recommend it for anyone seeking a powerful and dependable server management solution!

    Avatar
    user_WyXHYylj
    2025-04-24

    As a dedicated user of the bitpin-mcp-server by Kamyab7, I am thoroughly impressed with its performance and reliability. The server has proven to be exceptionally stable and efficient, handling high traffic with ease. The setup was straightforward, and the support from Kamyab7 has been outstanding. This is definitely a must-have for anyone looking to enhance their server capabilities!

    Avatar
    user_zJwpIBoS
    2025-04-24

    Bitpin-mcp-server by Kamyab7 is an exceptional product for managing Minecraft servers efficiently. Its user-friendly interface and powerful features make server administration a breeze. I love how it simplifies tasks and optimizes server performance. Highly recommend for any serious Minecraft server owner!

    Avatar
    user_RczxYfXP
    2025-04-24

    As a loyal user of the bitpin-mcp-server by Kamyab7, I must say it has transformed my workflow. The server is incredibly reliable and efficient, handling complex tasks seamlessly. The setup is straightforward, and the documentation is comprehensive. Highly recommended for anyone looking for a robust and user-friendly MCP solution!

    Avatar
    user_svLi9LsP
    2025-04-24

    As a dedicated user of the bitpin-mcp-server by Kamyab7, I must say it has significantly improved my server management tasks. The seamless integration and intuitive interface make it a top-tier choice for any server administrator. Additionally, the reliability and support provided assure that any issues are promptly addressed. Highly recommended!