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

# Create a new app commission rate

> Create a new commission rate to be applied to profit on risk created via the given app. Commission rates can have a value between 0.0 and 1.0, where e.g., 0.01 would be 1% of the profit.<br /><br />The most recently created rate will be used as the default rate. The default rate is used when no commission rate ID is passed during order creation.<br /><br />NOTE maximum effective commission rate for an app will be <br /><code>1.0 - protocol commission(fee) rate</code>



## OpenAPI

````yaml https://docs.api.monacoprotocol.xyz/api/v1/exchange-openapi-general.json post /apps/{id}/commission-rates
openapi: 3.1.0
info:
  title: BetDEX General Integration API
  description: >-
    A RESTful API that allows you to interact with the BetDEX Exchange. Provides
    endpoints for managing Events, Markets, Sessions, Wallets and Orders. To
    interact with the API, a client must have an App Id and an API Key to
    authenticate and create a session.
  version: '0.1'
servers:
  - url: https://sandbox.api.btdx.io/
    description: Sandbox API Server
  - url: https://prod.api.btdx.io/
    description: Production API Server
security: []
tags:
  - name: API Key Management
  - name: App Management
  - name: Currencies
  - name: Event Categories
  - name: Event Groups
  - name: Event Subcategories
  - name: Events
  - name: External Reference Sources
  - name: Heartbeat Management
  - name: Market Prices
  - name: Market Types
  - name: Markets
  - name: Orders
  - name: Participants
  - name: Session Management
  - name: Status
  - name: Trades
  - name: Wallet API Key Management
  - name: Wallets
paths:
  /apps/{id}/commission-rates:
    post:
      tags:
        - App Management
      summary: Create a new app commission rate
      description: >-
        Create a new commission rate to be applied to profit on risk created via
        the given app. Commission rates can have a value between 0.0 and 1.0,
        where e.g., 0.01 would be 1% of the profit.<br /><br />The most recently
        created rate will be used as the default rate. The default rate is used
        when no commission rate ID is passed during order creation.<br /><br
        />NOTE maximum effective commission rate for an app will be <br
        /><code>1.0 - protocol commission(fee) rate</code>
      operationId: updateCommissionRate
      parameters:
        - name: authorization
          in: header
          description: Header with the accessToken for the current session
          required: true
          schema:
            type: string
          example: Bearer eyJ0eXAiOiJ...bjV7AtDgA
        - name: id
          in: path
          description: app id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAppCommissionRateRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AppResponse'
        '401':
          description: Session invalid
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AppResponse'
        '403':
          description: Missing permission
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AppResponse'
components:
  schemas:
    UpdateAppCommissionRateRequest:
      type: object
      properties:
        commissionRate:
          type: number
          description: A value between 0.00 and 1.0, where e.g., 0.01 is treated as 1%
          maximum: 1
          minimum: 0
      required:
        - commissionRate
    AppResponse:
      type: object
      properties:
        _meta:
          $ref: '#/components/schemas/Meta'
        apps:
          type: array
          items:
            $ref: '#/components/schemas/App'
        commissionRates:
          type: array
          items:
            $ref: '#/components/schemas/CommissionRate'
    Meta:
      type: object
      properties:
        _primary_document:
          type: string
          enum:
            - apiKeys
            - apps
            - categories
            - commissionRates
            - currencies
            - depositAddresses
            - depositRequests
            - events
            - eventGroups
            - externalReferences
            - externalReferenceSources
            - heartbeats
            - ids
            - markets
            - marketOutcomes
            - marketPositions
            - marketTypes
            - orders
            - participants
            - prices
            - priceLadders
            - sessions
            - statuses
            - subcategories
            - trades
            - transactions
            - wallets
            - walletMetrics
            - withdrawalRequests
        _count:
          type: integer
          format: int32
        _page:
          $ref: '#/components/schemas/PageMeta'
    App:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        apiKey:
          $ref: '#/components/schemas/APIKey'
        commissionRate:
          type: number
        protocolFeeRate:
          type: number
        createdAt:
          type: string
          format: date-time
        modifiedAt:
          type: string
          format: date-time
    CommissionRate:
      type: object
      properties:
        id:
          type: string
        rate:
          type: number
        createdAt:
          type: string
          format: date-time
    PageMeta:
      type: object
      properties:
        _pageNumber:
          type: integer
          format: int32
        _pageSize:
          type: integer
          format: int32
        _totalElements:
          type: integer
          format: int64
        _totalPages:
          type: integer
          format: int32
    APIKey:
      type: object
      properties:
        appId:
          type: string
        name:
          type: string
        active:
          type: boolean
        secret:
          type: string
        createdAt:
          type: string
          format: date-time
        modifiedAt:
          type: string
          format: date-time

````