Vortex
    • Overview
    • Vortex SDK
    • Quick Start With The SDK
    • Ramp Lifecycle
    • Ephemeral Key Custody
    • Authentication And Partner Keys
    • Sandbox
    • BRL / KYC notes
    • Production Checklist
    • Quotes
      • Quotes And Pricing
      • Get existing quote
        GET
      • Create a new quote
        POST
      • Create a quote for the best network
        POST
    • Vortex Widget
      • Widget parameters
      • Widget Integration
      • Generating widget URL (for existing quote)
        POST
      • Generating widget URL (for existing quote)
        POST
    • Ramp
      • Get ramp status
        GET
      • Get ramp history for wallet address
        GET
      • Register new ramp process
        POST
      • Update ramp process
        POST
      • Start ramp process
        POST
      • Get ramp error logs
        GET
    • Account Management
      • Brazil
        • Brazilian KYC Process Overview
        • Get status of the last ramp event for a user
        • Start KYC level 2 process for a user
      • Europe
        • Coming soon...
      • Get user's remaining transaction limits
        GET
      • Get KYC document upload URLs
        POST
      • Get user information
        GET
      • Create user or retry KYC
        POST
      • Submit KYC level 1 data
        POST
      • Get selfie liveness URL
        GET
      • Get user's KYC status
        GET
      • Validate Pix key
        GET
    • Webhooks
      • Overview
      • Webhooks
      • Register Webhook
      • Delete Webhook
    • Public Key
      • Overview
      • Public Key
    • Reference Data
      • Supported Payment Methods
      • Supported Cryptocurrencies
      • Supported Countries
      • Supported Fiat Currencies
    • Schemas
      • Schemas
      • StartKYC2Response
      • GetKycStatusResponse
      • ValidatePixKeyResponse
      • GetUserRemainingLimitResponse
      • TriggerOfframpRequest
      • TriggerOfframpResponse
      • BrlaAddress
      • TaxIdType
      • CreateSubaccountRequest
      • CreateSubaccountResponse
      • KYCDocType
      • KYCDataUploadFileFiles
      • StartKYC2Request
      • GetUserResponse
      • StartRampRequest
      • RampDirection
      • GetWidgetUrlLocked
      • CountryCode
      • PaymentMethod
      • SimpleStatus
      • FiatToken
      • OnChainToken
      • GetWidgetUrlRefresh
      • CreateBestQuoteRequest
      • GetRampHistoryTransaction
      • GetRampHistoryResponse
      • BrlaErrorResponse
      • RegisterRampRequest
      • AccountMeta
      • Networks
      • PaymentData
      • RampProcess
      • RampPhase
      • DestinationType
      • UnsignedTx
      • CleanupPhase
      • CreateQuoteRequest
      • QuoteResponse
      • RampCurrency
      • UpdateRampRequest
      • PresignedTx
      • ErrorResponse
      • RampErrorLog
      • GetRampErrorLogsResponse
      • BrlaValidatePixKeyResponse
      • BrlaGetSelfieLivenessUrlResponse
      • AveniaDocumentType
      • AveniaKYCDataUploadRequest
      • DocumentUploadEntry
      • AveniaKYCDataUploadResponse
      • KycLevel1Payload
      • KycLevel1Response

    Quick Start With The SDK

    Install the SDK:
    Initialize it:
    import { VortexSdk, FiatToken, EvmToken, Networks, RampDirection } from "@vortexfi/sdk";
    import type { VortexSdkConfig } from "@vortexfi/sdk";
    
    const config: VortexSdkConfig = {
      apiBaseUrl: "https://api.vortexfinance.co",
      publicKey: "pk_live_...",      // optional today; required after grace period
      secretKey: "sk_live_...",      // optional today; required after grace period
      storeEphemeralKeys: true       // default
    };
    
    const sdk = new VortexSdk(config);
    publicKey is attached to quote requests for partner attribution and discount eligibility. secretKey is sent as the X-API-Key header on every request and authenticates the partner. Secret keys must only be used in trusted server-side environments.
    Create a quote (BRL → USDC on Polygon, via PIX):
    const quote = await sdk.createQuote({
      rampType: RampDirection.BUY,
      from: "pix",
      to: Networks.Polygon,
      inputAmount: "150000",
      inputCurrency: FiatToken.BRL,
      outputCurrency: EvmToken.USDC
    });
    Register the ramp:
    const { rampProcess } = await sdk.registerRamp(quote, {
      destinationAddress: "0x1234567890123456789012345678901234567890",
      taxId: "12345678900"
    });
    For BRL buy flows, the ramp process contains a PIX payment payload:
    console.log(rampProcess.depositQrCode);
    After the user completes the fiat payment, start the ramp. startRamp takes only the ramp ID:
    const startedRamp = await sdk.startRamp(rampProcess.id);
    Poll status or use webhooks:
    const status = await sdk.getRampStatus(rampProcess.id);

    Why The SDK Is Preferred#

    The SDK creates fresh ephemeral accounts for each ramp (one each on Stellar, Pendulum, and Moonbeam), signs the transactions returned by Vortex, submits required update calls, and can store a local backup of ephemeral secrets. This removes several integration risks from partner applications.
    If you disable SDK key storage with storeEphemeralKeys: false, your application must provide an equivalent secure backup mechanism.
    The default local backup is a JSON file named ephemerals_{rampId}.json written to the Node process's current working directory. It is not encrypted at rest. For production, run the SDK from a directory with restricted filesystem permissions, encrypt the file yourself, or disable storeEphemeralKeys and implement a custom store.

    Modified at 2026-05-16 09:36:10
    Previous
    Vortex SDK
    Next
    Ramp Lifecycle
    Built with