Hive Civilization Basis Perp API

The basis-perp API from Hive Civilization — 12 operation(s) for basis-perp.

Operations 12

POST /v1/perp/basis/open Open Position #
POST /v1/perp/basis/close Close Position Endpoint #
POST /v1/perp/basis/increase Increase Position Endpoint #
POST /v1/perp/basis/decrease Decrease Position Endpoint #
POST /v1/perp/basis/liquidate Liquidate Endpoint #
POST /v1/perp/basis/funding/tick Funding Tick Endpoint #
GET /v1/perp/basis/positions List Positions Endpoint #
GET /v1/perp/basis/position/{position_id} Get Position Endpoint #
GET /v1/perp/basis/market Market State Endpoint #
GET /v1/perp/basis/leaderboard Leaderboard Endpoint #
GET /v1/perp/basis/gates Gates Endpoint #
GET /v1/perp/basis/health Health Endpoint #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/thehiveryiq-com-basis-perp-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

thehiveryiq-com-basis-perp-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HiveMorph v0.1 Basis Perp API
  description: 'Polymorphic agent runtime — single shape (Merchant), single supermodel (W2 MERCHANT). Three gates: NEED + YIELD + CLEAN-MONEY.'
  version: 0.1.0
tags:
- name: basis-perp
paths:
  /v1/perp/basis/open:
    post:
      tags:
      - basis-perp
      summary: Open Position
      operationId: open_position_v1_perp_basis_open_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Open Position V1 Perp Basis Open Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/close:
    post:
      tags:
      - basis-perp
      summary: Close Position Endpoint
      operationId: close_position_endpoint_v1_perp_basis_close_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloseBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Close Position Endpoint V1 Perp Basis Close Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/increase:
    post:
      tags:
      - basis-perp
      summary: Increase Position Endpoint
      operationId: increase_position_endpoint_v1_perp_basis_increase_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IncreaseBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Increase Position Endpoint V1 Perp Basis Increase Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/decrease:
    post:
      tags:
      - basis-perp
      summary: Decrease Position Endpoint
      operationId: decrease_position_endpoint_v1_perp_basis_decrease_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecreaseBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Decrease Position Endpoint V1 Perp Basis Decrease Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/liquidate:
    post:
      tags:
      - basis-perp
      summary: Liquidate Endpoint
      operationId: liquidate_endpoint_v1_perp_basis_liquidate_post
      parameters:
      - name: X-Admin-Api-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Admin-Api-Key
      - name: X-Hive-Trust
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Hive-Trust
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LiquidateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Liquidate Endpoint V1 Perp Basis Liquidate Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/funding/tick:
    post:
      tags:
      - basis-perp
      summary: Funding Tick Endpoint
      operationId: funding_tick_endpoint_v1_perp_basis_funding_tick_post
      parameters:
      - name: X-Admin-Api-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Admin-Api-Key
      - name: X-Hive-Trust
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Hive-Trust
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Funding Tick Endpoint V1 Perp Basis Funding Tick Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/positions:
    get:
      tags:
      - basis-perp
      summary: List Positions Endpoint
      operationId: list_positions_endpoint_v1_perp_basis_positions_get
      parameters:
      - name: owner_did
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Owner Did
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response List Positions Endpoint V1 Perp Basis Positions Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/position/{position_id}:
    get:
      tags:
      - basis-perp
      summary: Get Position Endpoint
      operationId: get_position_endpoint_v1_perp_basis_position__position_id__get
      parameters:
      - name: position_id
        in: path
        required: true
        schema:
          type: string
          title: Position Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Get Position Endpoint V1 Perp Basis Position  Position Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/market:
    get:
      tags:
      - basis-perp
      summary: Market State Endpoint
      operationId: market_state_endpoint_v1_perp_basis_market_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Market State Endpoint V1 Perp Basis Market Get
  /v1/perp/basis/leaderboard:
    get:
      tags:
      - basis-perp
      summary: Leaderboard Endpoint
      operationId: leaderboard_endpoint_v1_perp_basis_leaderboard_get
      parameters:
      - name: top_n
        in: query
        required: false
        schema:
          type: integer
          maximum: 500
          minimum: 1
          default: 50
          title: Top N
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Leaderboard Endpoint V1 Perp Basis Leaderboard Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/perp/basis/gates:
    get:
      tags:
      - basis-perp
      summary: Gates Endpoint
      operationId: gates_endpoint_v1_perp_basis_gates_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Gates Endpoint V1 Perp Basis Gates Get
  /v1/perp/basis/health:
    get:
      tags:
      - basis-perp
      summary: Health Endpoint
      operationId: health_endpoint_v1_perp_basis_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Health Endpoint V1 Perp Basis Health Get
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    OpenBody:
      properties:
        side:
          type: string
          title: Side
          description: long or short
        size_usdc:
          type: number
          exclusiveMinimum: 0.0
          title: Size Usdc
        collateral_asset:
          type: string
          title: Collateral Asset
          description: USDC or USDT
        collateral_amount:
          anyOf:
          - type: number
            exclusiveMinimum: 0.0
          - type: 'null'
          title: Collateral Amount
          description: Collateral in collateral_asset units. Defaults to 25% of size_usdc.
        owner_did:
          type: string
          title: Owner Did
          default: did:hive:caller
        payout_address:
          type: string
          title: Payout Address
          default: ''
        rail_settlement_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Rail Settlement Id
      type: object
      required:
      - side
      - size_usdc
      - collateral_asset
      title: OpenBody
    CloseBody:
      properties:
        position_id:
          type: string
          title: Position Id
      type: object
      required:
      - position_id
      title: CloseBody
    LiquidateBody:
      properties:
        position_id:
          type: string
          title: Position Id
      type: object
      required:
      - position_id
      title: LiquidateBody
    DecreaseBody:
      properties:
        position_id:
          type: string
          title: Position Id
        reduce_size_usdc:
          type: number
          exclusiveMinimum: 0.0
          title: Reduce Size Usdc
      type: object
      required:
      - position_id
      - reduce_size_usdc
      title: DecreaseBody
    IncreaseBody:
      properties:
        position_id:
          type: string
          title: Position Id
        additional_size_usdc:
          type: number
          exclusiveMinimum: 0.0
          title: Additional Size Usdc
        additional_collateral:
          type: number
          exclusiveMinimum: 0.0
          title: Additional Collateral
      type: object
      required:
      - position_id
      - additional_size_usdc
      - additional_collateral
      title: IncreaseBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError