Magpie Protocol
  • Magpie Protocol
    • What is Magpie solving?
      • What is DeFi?
    • Magpies Key Features
      • Use Cases
    • FLY
      • xFLY & FLY33
  • 📶Supported Networks
  • Guides
    • 📖Glossary of DeFi Terms
    • 👜Connect Wallet
    • 🔄On-Chain Swap
    • 🔀Cross-Chain Swap
    • 🔂Swap configuration
    • 🥚Magpie Boosts
    • 📒Transaction History
    • 💲Portfolio
  • Media Kit
  • 👩‍💻Developers
    • Magpie Contracts
      • MagpieCCTPBridge
      • MagpieCelerBridgeV2
      • MagpieRouterV3
      • MagpieStargateBridgeV3
      • LibAsset
      • LibBridge
      • LibRouter
    • Smart Contracts Audit
    • Deployments
    • API Reference
      • On chain swap
      • Cross chain swap
      • Requesting and Using API Key
Powered by GitBook
On this page
  • How to request API key
  • How to use API key
  1. Developers
  2. API Reference

Requesting and Using API Key

PreviousCross chain swap

Last updated 2 months ago

How to request API key

Should you require a dedicated API key, kindly open a support ticket on our . In your request, please include detailed information about your project and how you intend to utilize our APIs.

How to use API key

Pass apikey header besides the request, the response contains X-RateLimit-Limit-Second as the rate limit and X-RateLimit-Remaining-Second as the number of remaining requests for current second. To check that the API key works, you should see different rate-limit with and without the key.

$ curl -i '<http://api.magpiefi.xyz/aggregator/quote?.>..' | grep 'RateLimit'
RateLimit-Limit: 50
RateLimit-Remaining: 49
RateLimit-Reset: 1
X-RateLimit-Remaining-Second: 49
X-RateLimit-Limit-Second: 50

$ curl -i '<http://api.magpiefi.xyz/aggregator/quote?.>..' -H 'apikey: <APIKEY>' | grep 'RateLimit'
X-RateLimit-Remaining-Second: 199
X-RateLimit-Limit-Second: 200
RateLimit-Remaining: 199
RateLimit-Reset: 1
RateLimit-Limit: 200

👩‍💻
Discord