> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sprinter.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Signing Authorization for a Liquidity Transaction

> This endpoint streams signed authorization for a liquidity transaction

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sprinter.tech/liquidity/v2/chain/{dstChain}/protocol/{protocol}/signature' \
    --header 'X-Auth-Token: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{}'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.sprinter.tech/liquidity/v2/chain/{dstChain}/protocol/{protocol}/signature",
      headers={"X-Auth-Token": "YOUR_API_KEY"},
      json={}
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.sprinter.tech/liquidity/v2/chain/{dstChain}/protocol/{protocol}/signature",
    {
      method: "POST",
      headers: {
        "X-Auth-Token": "YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({})
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

  import (
  	"bytes"
  	"fmt"
  	"io"
  	"net/http"
  )

  func main() {
  	req, _ := http.NewRequest(
  		"POST",
  		"https://api.sprinter.tech/liquidity/v2/chain/{dstChain}/protocol/{protocol}/signature",
  		bytes.NewBuffer([]byte("{}")),
  	)
  	req.Header.Set("X-Auth-Token", "YOUR_API_KEY")
  	req.Header.Set("Content-Type", "application/json")
  	resp, _ := http.DefaultClient.Do(req)
  	defer resp.Body.Close()
  	body, _ := io.ReadAll(resp.Body)
  	fmt.Println(string(body))
  }
  ```
</RequestExample>


## OpenAPI

````yaml post /liquidity/v2/chain/{dstChain}/protocol/{protocol}/signature
openapi: 3.0.0
info:
  contact: {}
  title: ''
  version: 0.0.1
servers:
  - url: https://api.sprinter.tech
    description: Production server
security: []
paths:
  /liquidity/v2/chain/{dstChain}/protocol/{protocol}/signature:
    post:
      tags:
        - Liquidity
      summary: Get signing authorization for a liquidity transaction
      description: This endpoint streams signed authorization for a liquidity transaction
      parameters:
        - description: Name of the protocol, e.g., Across, Lighter
          name: protocol
          in: path
          required: true
          schema:
            type: string
        - description: Destination chain Caip id, eg. eip155:8453
          name: dstChain
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/liquidity.BorrowSignatureV2.body'
        description: request
        required: true
      responses:
        '200':
          description: >-
            This response is sent as a stringified json in SSE event with the
            event name 'data'
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/liquidity.BorrowSignatureResponse'
        '400':
          description: Bad request due to invalid input or missing parameters
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '500':
          description: Internal server error
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    liquidity.BorrowSignatureV2.body:
      type: object
      required:
        - caller
        - input
        - quoteId
        - txHash
      properties:
        caller:
          description: >-
            eoa wallet address which will be used to call the liquidity pool
            contract
          type: string
        input:
          description: >-
            hex encoded input data which will be executed on the liquidity pool
            contract with borrowed liquidity
          type: string
        metadata:
          description: >-
            protocol-specific metadata as JSON object. For lifi-escrow:
            {"srcChain": "eip155:1"}

            where srcChain is the source chain CAIP ID used for on-chain order
            fetching fallback
          type: array
          items:
            type: integer
        quoteId:
          description: quote ID obtained from the borrow quote endpoint
          type: string
        txHash:
          description: >-
            tx hash of the deposit transaction which will be used to verify
            liquidity repayment guarantee
          type: string
    liquidity.BorrowSignatureResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/liquidity.BorrowCost'
    responses.ErrorResponse:
      type: object
      required:
        - error
      properties:
        debug:
          type: string
        error:
          type: string
    liquidity.BorrowCost:
      description: Borrow authorisation signature and details.
      type: object
      required:
        - borrowAmount
        - borrowCost
        - borrowToken
        - liquidityPool
        - nonce
        - signature
      properties:
        borrowAmount:
          description: amount to be borrowed in lowest denomination of the borrowed token
          type: string
        borrowCost:
          description: >-
            cost to borrow the liquidity in lowest denomination of the borrowed
            token (excluding gas costs)
          type: string
        borrowToken:
          description: address of the token being borrowed from the liquidity pool
          type: string
        deadline:
          description: deadline for executing the borrow transaction
          type: string
        liquidityPool:
          description: >-
            address of the liquidity pool from which the liquidity will be
            borrowed
          type: string
        nonce:
          description: unique nonce for the borrow request
          type: string
        signature:
          description: >-
            hex string containing the MPC set signature used on the Liquidity
            pool contract
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-Auth-Token
      in: header

````