### Get Deposits History (JSON Example) Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves a list of deposit transactions. Supports filtering by date range and pagination. The response includes deposit details such as ID, amount, coin, status, and timestamps. This is a sample JSON response. ```json [ { "id": 1234, "amount": "10.5", "coin": "BRL", "status": "CREDITED", "transferType": "pix", "source": { "bank_code": "208", "bank_name": "BTG Pactual", "account_branch": "0001", "account_number": "0123432" }, "created_at": 646415100, "updated_at": 646415100 } ] ``` -------------------------------- ### GET /accounts/{accountId}/balances Source: https://api.mercadobitcoin.net/api/v4/docs/index Fetches the balances for all markets, including fiat, for a specified account. ```APIDOC ## List Balances ### Description Get balances for all markets, including fiat, for an account. ### Method GET ### Endpoint /v4/accounts/{accountId}/balances ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **available** (string) - Available amount. - **on_hold** (string) - On hold balance related to open orders. - **symbol** (string) - Symbol. - **total** (string) - Total balance (available + on_hold). #### Response Example ```json [ { "available": "1000.00000050", "on_hold": "300.00000300", "symbol": "BRL", "total": "1300.00000350" } ] ``` ``` -------------------------------- ### Create Order Response Sample Source: https://api.mercadobitcoin.net/api/v4/docs/index Provides an example of a successful response when creating an order. It includes a unique order identifier that can be used for subsequent operations like cancellation or status checks. ```json { "orderId": "01H50SZYF0WZQY8Q3NCJ2HGD8G" } ``` -------------------------------- ### Get Deposit Address Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves the deposit addresses and/or tag/memo for a given cryptocurrency symbol. This is primarily for use with multi-wallet setups and only available for the main wallet. ```APIDOC ## GET /accounts/{accountId}/wallet/{symbol}/deposits/addresses ### Description Get the deposit addresses (wallet-in) and/or tag/memo. Deposits are only available for the main wallet when using multiwallet. ### Method GET ### Endpoint `https://api.mercadobitcoin.net/api/v4/accounts/{accountId}/wallet/{symbol}/deposits/addresses` ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. - **symbol** (string) - Required - Instrument asset in the form BASE (e.g. BTC). #### Query Parameters - **network** (string) - Optional - Enum: "stellar" "ethereum" - Network of asset (for assets with more than one network), ignored if asset in present in one network only. ### Request Example ```json { "example": "No request body" } ``` ### Response #### Success Response (200) - **config** (object) - Asset extra deposit config. - **addresses** (Array of objects) - Array of addresses. - **hash** (string) - The deposit address. - **extra** (object) - Additional details for the address, such as address tags. - **address_tag** (string) - The address tag or memo. - **qrcode** (object) - QR code for the deposit address. - **base64** (string) - Base64 encoded QR code image. - **format** (string) - Format of the QR code (e.g., "png"). #### Response Example ```json { "config": { "contract_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9" }, "addresses": [ { "hash": "0x7Fc66xxxxxxA76Ad7xxxxxx37bFc5xxxxxxDDaE9", "extra": { "address_tag": "1000001" }, "qrcode": { "base64": "iVBORw0KGgoAAAANSUhEUgAAALQAAAC0AQAAAAAVtjufAAABfUlEQVR4nO2XXXLDQAiDuQH3v6VusJWEHdxO+6bmKZ78eD8ywy4CTOr8eqE+/F28qhrAaX4WvIzy5quLX1XoWWZ5tW5Av9zAvcxynkiG4vp/uA5GC2OW5zLxrSPhRzwTXEI/rm/5kOC6SqoTyusznzO8pAczl7Gj/SDLlUy6hUQ/OlmWS/QWY275B53lTCdXs5VH7X5C3AmlwpOJXnc/GV6TrsUNlDw3shw2HYlDS7/iluI6GbiwLr26pzgEpl/AP+osV7jcUeEbbD5kuBKLbx7NBiDMdZC27NJHld1ZrqLgwVR17nt3Poe4slXBcsXBRRLlquUJ3ZTdaz8hPs76ziq11yjHRMtPB/T2jRSvmSq8kO7bzzNcn+2WJKf16Bsh7rA5q9Sb1m+Il7pGeXA5MwVkuTtfzeCoKtm4Zfg0PZaeM0r9L8s99440OJf3KJ+efUm+cUtyj4qSHjN7pbl7kypkZussP+NJj2aLEubXoCs0T390lP/1v+/D38C/AFLmLEPGvzbTAAAAAElFTkSuQmCC", "format": "png" } } ] } ``` ``` -------------------------------- ### Order Response Schema Example (JSON) Source: https://api.mercadobitcoin.net/api/v4/docs/index This JSON object represents a sample response for an order, detailing its average price, cost, creation timestamp, executions, fees, quantities, identifiers, instrument, prices, side, status, stop price, trigger order ID, type, and update timestamp. It serves as a reference for understanding the structure of order data returned by the API. ```json { "avgPrice": 500, "cost": 10000, "created_at": 1636047578, "executions": [ { "executed_at": 1634731027, "fee_rate": "0.70000000", "id": "16", "instrument": "BTC-BRL", "price": 500, "qty": "0.001", "side": "buy", "liquidity": "maker" } ], "externalId": "1372183", "fee": "0.003", "filledQty": "0.001", "id": "01HCDAA7YJ68ZJ0FTEPR7DYDS1", "instrument": "BTC-BRL", "limitPrice": 9997, "qty": "0.01000000", "side": "buy", "status": "filled", "stopPrice": 18000, "triggerOrderId": "42", "type": "limit", "updated_at": 1636047578 } ``` -------------------------------- ### Cancel All Open Orders Response Example (JSON) Source: https://api.mercadobitcoin.net/api/v4/docs/index This JSON object illustrates a typical response after attempting to cancel all open orders for an account. It includes details about the crypto and fiat symbols, the order ID, the type of order, the side (BID for buy, ASK for sell), and the status of the cancellation request (e.g., 'queued_to_cancel'). ```json { "crypto": "BTC", "fiat": "BRL", "order_id": "27", "order_type": "limit", "side": "BID", "status": "queued_to_cancel" } ``` -------------------------------- ### Get BRL Withdraw Config Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves the configuration details for BRL cashouts, including limits and fees. ```APIDOC ## GET /accounts/{accountId}/wallet/withdraw/config/BRL ### Description Retrieves the configuration details for BRL cashouts, including limits and fees information. ### Method GET ### Endpoint `/accounts/{accountId}/wallet/withdraw/config/BRL` ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. ### Response #### Success Response (200) [Details of BRL withdraw configuration] #### Response Example [Response example not provided in the source text] ``` -------------------------------- ### GET /accounts/{accountId}/tier Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves the tax tier for a given account. ```APIDOC ## Get Tier ### Description Get tier tax. ### Method GET ### Endpoint /v4/accounts/{accountId}/tier ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **tier** (string) - It's the tax tier of account. #### Response Example ```json [ { "tier": "13" } ] ``` ``` -------------------------------- ### GET /accounts Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves a list of accounts owned by the user. Typically, MercadoBitcoin operates with a single default account. ```APIDOC ## List Accounts ### Description Get a list of accounts owned by the user. Usually, MercadoBitcoin works with only one default account. ### Method GET ### Endpoint /v4/accounts ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **currency** (string) - Currency of the account. - **currencySign** (string) - CurrencySign of the account. - **id** (string) - Account identifier (accountId). - **name** (string) - Name of the account. - **type** (string) - Account type. #### Response Example ```json [ { "currency": "BRL", "currencySign": "R$", "id": "a322205ace882ef800553118e5000066", "name": "Mercado Bitcoin", "type": "live" } ] ``` ``` -------------------------------- ### Error Handling Source: https://api.mercadobitcoin.net/api/v4/docs/index This section details common error codes and their descriptions, along with examples for forbidden and internal server errors. ```APIDOC ### Possible errors return | Error | | --- | | API_UNAVAILABLE | | FORBIDDEN | | INVALID_SYMBOL | | INVALID_PARAMETER | | INSUFFICIENT_BALANCE | | ORDER_NOT_FOUND | | ADDRESS_NOT_REGISTERED | | PROBLEM_TRANSFERRING | | INVALID_ACCESS | | ORDER_PROCESSED | | INVALID_BANK_ACCOUNT | | INVALID_WITHDRAWAL_VALUE | | WITHDRAWAL_AMOUNT_LIMIT | | WITHDRAWAL_DIGITAL_AMOUNT_LIMIT | | MINIMUM_WITHDRAWAL_AMOUNT | | MINIMUM_BITCOIN_TRANSFERS | | MINIMUM_LITECOIN_TRANSFERS | | MIN_MAX_BITCOIN_EXCEEDED | | MIN_MAX_LITECOIN_EXCEEDED | | MIN_MAX_BRL_EXCEEDED | | DUPLICATE_STATUS | | INVALID_STATUS_VALUE | | INVALID_DECIMAL_PLACES | | PARAMETER_SIZE_LARGE | | INVALID_TRANSFER_ID | | MINIMUM_BCASH_TRANSFERS | | MIN_MAX_BCASH_EXCEEDED | | MINIMUM_XRP_TRANSFERS | | MIN_MAX_XRP_EXCEEDED | | MINIMUM_ETHEREUM_TRANSFERS | | MIN_MAX_ETHEREUM_EXCEEDED | | INVALID_ADDRESS | | REQUEST_RATE_EXCEEDED | | REQUEST_DENIED | | REQUEST_BLOCKED | | ORDER_IN_PROCESSING | | ERROR_MONITOR_PRICE | | BALANCE_RESERVED_NOT_CANCELED | | ERROR_RESERVE_BALANCE | | ERROR_LEGACY_PLACE_ORDER | | ERROR_PUBLISH_ORDER | | INVALID_LIMIT_PRICE | | ORDER_DUPLICATE | | BALANCE_NOT_RESERVED | | INVALID_MAX_LIMIT_PRICE | | INVALID_MIN_LIMIT_PRICE | | INVALID_MAX_QUANTITY | | INVALID_MIN_QUANTITY | | INVALID_PAIR | | INVALID_SIDE | | INVALID_STOP_PRICE | | MISSING_FIELD | | ASSET_NETWORKS_NOT_FOUND | | INVALID_SYMBOL_NETWORK | | DEPOSIT_UNAVAILABLE | ### Forbidden error example Response status code: `403` Response body payload ```json { "code": "API|FORBIDDEN", "message": "You need to be authenticated" } ``` ### Internal server error example Response status code: `500` Response body payload ```json { "code": "API|INTERNAL_SERVER_ERROR", "message": "An unexpected error has occurred" } ``` ``` -------------------------------- ### Withdraw Coin Response (JSON Example) Source: https://api.mercadobitcoin.net/api/v4/docs/index Confirms the initiation of a coin withdrawal. The response provides details of the withdrawal transaction, including its unique ID, status, quantity, fees, and timestamps. The status code indicates the transaction's state (e.g., 1 for open, 2 for done, 3 for canceled). ```json { "account": "3", "address": "bc1qs62xef6x0tyxsz87fya6le7htc6q5wayhqdzen", "coin": "BTC", "created_at": "1636047578", "description": "description example", "destination_tag": "100000044", "fee": "0.001", "id": 1, "net_quantity": "1", "network": "bitcoin", "quantity": "2", "status": 1, "tx": "0.001", "updated_at": "1636047578" } ``` -------------------------------- ### GET /accounts/{accountId}/wallet/withdraw/bank-accounts Source: https://api.mercadobitcoin.net/api/v4/docs/index Lists bank accounts that are registered and available for API cash outs. ```APIDOC ## GET /accounts/{accountId}/wallet/withdraw/bank-accounts ### Description Lists bank accounts available for API cash outs ### Method GET ### Endpoint https://api.mercadobitcoin.net/api/v4/accounts/{accountId}/wallet/withdraw/bank-accounts ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts ### Response #### Success Response (200) - **account_ref** (integer) - Bank account id informed for fiat withdrawal. - **bank_code** (string) - Bank code/number. - **bank_name** (string) - Bank name. - **recipient_name** (string) - Name of the withdrawal recipient entity. - **recipient_tax_id** (string) - Tax id of the withdrawal recipient entity. - **account_branch** (string) - Bank account branch. - **account_number** (string) - Account number. - **account_type** (string) - Account type. It can be CHECKING or SAVING - **account_holder** (string) - Joint account holder. - **joint_account** (boolean) - Indicates if it is a joint account #### Response Example ```json [ { "account_ref": 1, "bank_code": "208", "bank_name": "BTG Pactual", "recipient_name": "Mercado Bitcoin", "recipient_tax_id": "18.213.434.0001/35", "account_branch": "0001", "account_number": "0123432", "account_type": "CHECKING", "account_holder": "", "joint_account": false } ] ``` ``` -------------------------------- ### Withdraw Coin Request (JSON Example) Source: https://api.mercadobitcoin.net/api/v4/docs/index Initiates a cryptocurrency or Brazilian Real withdrawal. Requires account ID and symbol. The request body specifies withdrawal details like destination account/address, quantity, and network. Note that transfers are restricted to 'reliable' destinations and may require email approval and specific security configurations. ```json { "account_ref": 1, "address": "kasjdhaiucghajn1ekjhqwdkd", "description": "description example", "destination_tag": "string", "network": "stellar", "quantity": "2.5", "tx_fee": "2" } ``` -------------------------------- ### GET /accounts/{accountId}/{symbol}/fees Source: https://api.mercadobitcoin.net/api/v4/docs/index Fetches the trading fees for a specific symbol within an account. ```APIDOC ## Get Trading Fees ### Description Get your trading fees for each symbol. ### Method GET ### Endpoint /v4/accounts/{accountId}/{symbol}/fees ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. - **symbol** (string) - Required - Instrument symbol in the form BASE-QUOTE(e.g. BTC-BRL). #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **base** (string) - Base of the market. - **quote** (string) - Quote of the market. - **maker_fee** (string) - Your maker fee of the market. - **taker_fee** (string) - Your taker fee of the market. #### Response Example ```json { "base": "BTC", "quote": "BRL", "maker_fee": "0.00300000", "taker_fee": "0.00700000" } ``` ``` -------------------------------- ### GET /accounts/{accountId}/positions Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves open positions (open orders) for a specified account. Supports filtering by symbols. ```APIDOC ## List Positions ### Description Get open positions (open orders) for an account. ### Method GET ### Endpoint /v4/accounts/{accountId}/positions ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. #### Query Parameters - **symbols** (string) - Optional - Instrument symbol in the form BASE-QUOTE(e.g. BTC-BRL,LTC-BRL). #### Request Body None ### Request Example None ### Response #### Success Response (200) - **avgPrice** (number) - Simple average price of position trades. - **category** (string) - Type of orders (limit, post-only, stoplimit). - **id** (string) - Unique order identifier (orderId). - **instrument** (string) - Instrument symbol in the form BASE-QUOTE (e.g. "BTC-BRL"). - **qty** (string) - Order quantity (volume). - **side** (string) - Side of orders (buy, sell). #### Response Example ```json [ { "avgPrice": 380, "category": "limit", "id": "27", "instrument": "BTC-BRL", "qty": "0.001", "side": "buy" } ] ``` ``` -------------------------------- ### GET /tickers Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves the current trading prices for specified instruments. This endpoint provides real-time buy, sell, last, high, low, open, and volume data. ```APIDOC ## GET /tickers ### Description Get current prices of the instrument. ### Method GET ### Endpoint https://api.mercadobitcoin.net/api/v4/tickers ### Parameters #### Query Parameters - **symbols** (string) - Required - Instrument symbol in the form BASE-QUOTE (e.g. BTC-BRL,LTC-BRL) ### Request Example ```json { "example": "GET /api/v4/tickers?symbols=BTC-BRL,LTC-BRL" } ``` ### Response #### Success Response (200) - **buy** (string) - The last buy price. - **date** (integer) - Last update date in nanoseconds. - **high** (string) - The highest price. - **last** (string) - The last price. - **low** (string) - The lowest price. - **open** (string) - The first price. - **pair** (string) - Pair name. It is equal to the requested one. - **sell** (string) - The last sell price. - **vol** (string) - The total volume. #### Response Example ```json [ { "buy": "160.00000005", "date": 1636107279, "high": "145.00000001", "last": "144.07000004", "low": "143.00000002", "open": "143.00000007", "pair": "BTC-BRL", "sell": "145.00000006", "vol": "84.00100003" } ] ``` ``` -------------------------------- ### Get Account Orders Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves a list of orders for a specific account, with options to filter by execution status, symbol, order status, and quantity. ```APIDOC ## GET /accounts/{accountId}/orders ### Description List orders from all markets (most recent first). ### Method GET ### Endpoint /accounts/{accountId}/orders ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts #### Query Parameters - **has_executions** (string) - Optional - Filter for orders with or without execution. Example: has_executions=true - **symbol** (string) - Optional - Instrument symbol in the form BASE-QUOTE(e.g. BTC-BRL). Example:symbol=`BTC-BRL` - **status** (string) - Optional - Order status. Example: status=`created,working,cancelled,filled` - **size** (string) - Optional - Size quantity of orders to find. Example: size=`1` ### Response #### Success Response (200) - **items** (Array of objects (Orders)) - Items. List of orders ``` -------------------------------- ### GET /symbols Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves a list of all available trading instruments (symbols) on Mercado Bitcoin. It includes details like base currency, quote currency, deposit minimums, and trading information. ```APIDOC ## GET /symbols ### Description Get a list of all instruments. ### Method GET ### Endpoint https://api.mercadobitcoin.net/api/v4/symbols ### Parameters #### Query Parameters - **symbols** (string) - Optional - Instrument symbol in the form BASE-QUOTE (e.g. BTC-BRL,LTC-BRL) ### Request Example ```json { "example": "GET /api/v4/symbols" } ``` ### Response #### Success Response (200) - **base-currency** (array of strings) - Base of symbol - **currency** (array of strings) - Quote of symbol - **deposit-minimum** (array of strings) - Minimum value for deposit - **description** (array of strings) - Description of a symbol. Will be displayed in the chart legend for this symbol. - **exchange-listed** (array of booleans) - If is exchange listed - **exchange-traded** (array of booleans) - This symbol is able to trade - **minmovement** (array of strings) - Minimum price difference between two consecutive orders on the orderbook - **pricescale** (array of numbers) - Number of decimal digits allowed for the symbol price. It's presented in the form of a scale. Example: `1000` means 3 decimal digits - **session-regular** (array of strings) - Session that you can trade this symbol - **symbol** (array of strings) - This is the name of the symbol. (Base - Quote) - **timezone** (array of strings) - Timezone where symbol is trading - **type** (array of strings) - Type of symbol Enum: `CRYPTO` `FAN_TOKEN` `DIGITAL_ASSET` `UTILITY_TOKEN` `DEFI` - **withdraw-minimum** (array of strings) - Minimum value for withdrawal - **withdrawal-fee** (array of strings) - Withdrawal fee in mercado bitcoin - **min-price** (array of strings) - Minimum price to place order - **max-price** (array of strings) - Maximum price to place order - **min-volume** (array of strings) - Minimum volume to place order - **max-volume** (array of strings) - Maximum volume to place order - **min-cost** (array of strings) - Minimum cost to place order - **max-cost** (array of strings) - Maximum cost to place order #### Response Example ```json [ { "base-currency": [ "BTC" ], "currency": [ "BRL" ], "deposit-minimum": [ "0.00001" ], "description": [ "Bitcoin" ], "exchange-listed": [ true ], "exchange-traded": [ true ], "minmovement": [ "0.00000001" ], "pricescale": [ 100000000 ], "session-regular": [ "24x7" ], "symbol": [ "BTC-BRL" ], "timezone": [ "America/Sao_Paulo" ], "type": [ "CRYPTO" ], "withdraw-minimum": [ "0.0003" ], "withdrawal-fee": [ "0.0002" ], "min-price": [ "230000.00000000" ], "max-price": [ "1571759.96784993" ], "min-volume": [ "0.00000150" ], "max-volume": [ "8.46076128" ], "min-cost": [ "0.90000000" ], "max-cost": [ "1000000.00000000" ] } ] ``` ``` -------------------------------- ### Get OrderBook Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves the current order book (market depth) for a specified trading symbol. The response includes both buy (bids) and sell (asks) orders. ```APIDOC ## GET /websites/api_mercadobitcoin_net_api_v4/{symbol}/orderbook ### Description Retrieves the current order book (market depth) for a specified trading symbol. The response includes both buy (bids) and sell (asks) orders. ### Method GET ### Endpoint https://api.mercadobitcoin.net/api/v4/{symbol}/orderbook ### Parameters #### Path Parameters - **symbol** (string) - Required - Instrument symbol in the form BASE-QUOTE (e.g. BTC-BRL) #### Query Parameters - **limit** (string) - Optional - Limit of order book response data per side (`asks`, `bids`). Maximum allowed is 1000. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **asks** (Array>) - Array of arrays with two string elements - price and volume. It is sorted by price in ascending order. - **bids** (Array>) - Array of arrays with two string elements - price and volume. It is sorted by price in ascending order. - **timestamp** (number) - Timestamp when the order book was generated. #### Response Example ```json { "asks": [ ["1.0001", "1.0001"] ], "bids": [ ["1.0001", "1.0001"] ], "timestamp": 0 } ``` ``` -------------------------------- ### Get Trading Fees (API v4) Source: https://api.mercadobitcoin.net/api/v4/docs/index Fetches the trading fees for a specific symbol within an account. Requires Bearer authorization and both accountId and symbol as path parameters. The symbol should be in the format BASE-QUOTE (e.g., BTC-BRL). ```json { "base": "BTC", "quote": "BRL", "maker_fee": "0.00300000", "taker_fee": "0.00700000" } ``` -------------------------------- ### Order Response Sample Source: https://api.mercadobitcoin.net/api/v4/docs/index A sample JSON response for a successful order query (200 OK). It includes details such as average price, cost, creation date, execution data, fees, quantity, and order status. ```json [ { "avgPrice": 500, "cost": 10000, "created_at": 1636047578, "executions": [ { "executed_at": 1634731027, "fee_rate": "0.70000000", "id": "16", "instrument": "BTC-BRL", "price": 500, "qty": "0.001", "side": "buy", "liquidity": "maker" } ], "externalId": "1372183", "fee": "0.003", "filledQty": "0.001", "id": "01HCDAA7YJ68ZJ0FTEPR7DYDS1", "instrument": "BTC-BRL", "limitPrice": 9997, "qty": "0.01000000", "side": "buy", "status": "filled", "stopPrice": 18000, "triggerOrderId": "42", "type": "limit", "updated_at": 1636047578 } ] ``` -------------------------------- ### Sample Cryptocurrency Deposit Listing Response (JSON) Source: https://api.mercadobitcoin.net/api/v4/docs/index This JSON snippet displays a sample response for listing cryptocurrency deposits. It includes address, amount, coin, confirmation times, creation date, network, origin addresses, status, transaction ID, and transfer type. ```json [ { "address": "nrM1Ke8UsuFktMsmKgfXvqZH2gTLkZxtTG", "address_tag": 101742499, "amount": 2.5, "coin": "XLM", "confirmTimes": "12 / 12", "createdAt": 646415100, "network": "stellar", "origin": [ "klm3el7SusKftMSMkxfVvQZh5nTzkxTtPQ" ], "status": 1, "transaction_id": "e10e3ea123e99a4ec3999ca5ac2a57e23468e994e1b4tt324fe028bbf83548e577", "transferType": "external" } ] ``` -------------------------------- ### Get Order Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves details for a specific order using its unique identifier. ```APIDOC ## GET /accounts/{accountId}/{symbol}/orders/{orderId} ### Description Retrieves details for a specific order using its unique identifier. ### Method GET ### Endpoint /api/v4/accounts/{accountId}/{symbol}/orders/{orderId} ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. - **symbol** (string) - Required - Instrument symbol in the form BASE-QUOTE (e.g. BTC-BRL). - **orderId** (string) - Required - Unique order identifier. ### Response #### Success Response (200) - **[Details of the order will be returned here, but are not specified in the provided text]** #### Response Example (No specific response example provided in the input text for this endpoint.) ``` -------------------------------- ### Sample Cryptocurrency Deposit Response (JSON) Source: https://api.mercadobitcoin.net/api/v4/docs/index This JSON snippet represents a sample response for listing cryptocurrency deposits. It includes details such as creation timestamp, filled quantity, instrument, order ID, status, and transaction details. ```json { "items": [ { "created_at": 1636047578, "filledQty": "0.001", "id": "01HCDAA7YJ68ZJ0FTEPR7DYDS1", "instrument": "BTC-BRL", "limitPrice": 9997, "qty": "0.001", "side": "buy", "status": "filled", "stopPrice": 18000, "triggerOrderId": "42", "type": "limit", "updated_at": 1636047578, "external_id": "external-id-informed-by-user" } ] } ``` -------------------------------- ### Get Withdraw Coin Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves details of a specific withdrawal transaction by its ID. ```APIDOC ## GET /accounts/{accountId}/wallet/{symbol}/withdraw/{withdrawId} ### Description Retrieves details of a specific withdrawal transaction using the account ID, symbol, and withdrawal ID. ### Method GET ### Endpoint `/accounts/{accountId}/wallet/{symbol}/withdraw/{withdrawId}` ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. - **symbol** (string) - Required - Instrument symbol in the form BASE or QUOTE. - **withdrawId** (string) - Required - Withdraw identifier to find. ### Response #### Success Response (200) - **account** (string) - Account of withdraw (if coin is fiat). - **address** (string) - Address of withdraw (if coin is crypto). - **coin** (string) - Cryptocurrency or fiat, ex BTC, BRL, ETH. - **created_at** (string) - CreatedAt time of transaction. - **description** (string) - Description of withdraw. - **destination_tag** (string) - Destination of withdraw. - **fee** (string) - Fee of withdrawal. - **id** (number) - Id of withdrawal transaction. - **net_quantity** (string) - NetQuantity for withdraw. - **network** (string) - Network of withdraw. - **quantity** (string) - Quantity for withdraw. - **status** (integer) - Status of withdraw (1: open, 2: done, 3: canceled). - **tx** (string) - Tx of coin. - **updated_at** (string) - UpdatedAt time of transaction. #### Response Example ```json { "account": "3", "address": "bc1qs62xef6x0tyxsz87fya6le7htc6q5wayhqdzen", "coin": "BTC", "created_at": "1636047578", "description": "description example", "destination_tag": "100000044", "fee": "0.001", "id": 1, "net_quantity": "1", "network": "bitcoin", "quantity": "2", "status": 1, "tx": "0.001", "updated_at": "1636047578" } ``` ``` -------------------------------- ### GET /accounts/{accountId}/{symbol}/orders Source: https://api.mercadobitcoin.net/api/v4/docs/index Lists orders for a specific market, ordered from most recent. ```APIDOC ## List Orders ### Description List orders from specific market (most recent first). ### Method GET ### Endpoint /v4/accounts/{accountId}/{symbol}/orders ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. - **symbol** (string) - Required - Instrument symbol in the form BASE-QUOTE(e.g. BTC-BRL). #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) (Response schema not fully detailed in the provided text, but typically includes order details like id, status, price, quantity, etc.) #### Response Example (Response example not provided in the input text.) ``` -------------------------------- ### Sample Deposit Address Retrieval Response (JSON) Source: https://api.mercadobitcoin.net/api/v4/docs/index This JSON snippet shows a sample response for retrieving deposit addresses. It includes configuration details like contract address and an array of deposit addresses, each with a hash, extra information (like address tags), and a QR code. ```json { "config": { "contract_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9" }, "addresses": [ { "hash": "0x7Fc66xxxxxxA76Ad7xxxxxx37bFc5xxxxxxDDaE9", "extra": { "address_tag": "1000001" }, "qrcode": { "base64": "iVBORw0KGgoAAAANSUhEUgAAALQAAAC0AQAAAAAVtjufAAABfUlEQVR4nO2XXXLDQAiDuQH3v6VusJWEHdxO+6bmKZ78eD8ywy4CTOr8eqE+/F28qhrAaX4WvIzy5quLX1XoWWZ5tW5Av9zAvcxynkiG4vp/uA5GC2OW5zLxrSPhRzwTXEI/rm/5kOC6SqoTyusznzO8pAczl7Gj/SDLlUy6hUQ/OlmWS/QWY275B53lTCdXs5VH7X5C3AmlwpOJXnc/GV6TrsUNlDw3shw2HYlDS7/iluI6GbiwLr26pzgEpl/AP+osV7jcUeEbbD5kuBKLbx7NBiDMdZC27NJHld1ZrqLgwVR17nt3Poe4slXBcsXBRRLlquUJ3ZTdaz8hPs76ziq11yjHRMtPB/T2jRSvmSq8kO7bzzNcn+2WJKf16Bsh7rA5q9Sb1m+Il7pGeXA5MwVkuTtfzeCoKtm4Zfg0PZaeM0r9L8s99440OJf3KJ+efUm+cUtyj4qSHjN7pbl7kypkZussP+NJj2aLEubXoCs0T390lP/1v+/D38C/AFLmLEPGvzbTAAAAAElFTkSuQmCC", "format": "png" } } ] } ``` -------------------------------- ### Get Withdraw Limits Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves the withdrawal limits for fiat and crypto assets for the last 24 hours. ```APIDOC ## GET /accounts/{accountId}/wallet/withdraw/config/limits ### Description Retrieves fiat and crypto withdrawal limits for the last 24 hours. A value of 0 indicates that withdrawal is not possible for that asset. ### Method GET ### Endpoint `/accounts/{accountId}/wallet/withdraw/config/limits` ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. #### Query Parameters - **symbols** (string) - Optional - Symbols to filter. Ex.: BTC,LTC,SHIB,BRL. ### Response #### Success Response (200) - **symbol** (string) - Keys in the form of symbols and values in the form of quantity. #### Response Example ```json { "BTC": "0.00001000", "ETH": "1.00000000" } ``` ``` -------------------------------- ### Create Order Request Body Source: https://api.mercadobitcoin.net/api/v4/docs/index Defines the structure for creating a new order. Supports asynchronous order creation and various order parameters like cost, quantity, price, and type. The 'cost' parameter is used for market buy orders, while 'qty' is required when 'cost' is not provided. 'limitPrice' is for limit orders, and 'stopPrice' is for stop-limit orders. ```json { "async": true, "cost": 100, "externalId": "134872873", "limitPrice": 9997, "qty": "0.001", "side": "buy", "stopPrice": 1000, "type": "limit" } ``` -------------------------------- ### POST /authorize Source: https://api.mercadobitcoin.net/api/v4/docs/index Authenticates a user via username and password, returning an access token for subsequent API requests. ```APIDOC ## POST /authorize ### Description Username and password authentication. ### Method POST ### Endpoint https://api.mercadobitcoin.net/api/v4/authorize ### Parameters #### Request Body - **login** (string) - Required - Login of user - **password** (string) - Required - Password of user ### Request Example ```json { "login": "3f786850e387550fdab836ed7e6dc881", "password": "0bc78dc658371644f246ce092eea33c156f67a1c3ce01b927578c253bcbf7ecb" } ``` ### Response #### Success Response (200) - **access_token** (string) - Access token acts as a session ID that the application uses for making requests. This token should be protected as if it were user credentials. - **expiration** (integer) - The time when the token is expired is represented as the number of seconds since the Unix epoch (00:00:00 UTC on 1 January 1970). #### Response Example ```json { "access_token": "01GF442ATTVP4M6M0XGHQYT544", "expiration": 1666116857 } ``` ``` -------------------------------- ### POST /accounts/{accountId}/{symbol}/orders Source: https://api.mercadobitcoin.net/api/v4/docs/index Places a new order for a specified account and instrument. ```APIDOC ## POST /accounts/{accountId}/{symbol}/orders ### Description Places a new order for a specified account and instrument. ### Method POST ### Endpoint /api/v4/accounts/{accountId}/{symbol}/orders ### Parameters #### Path Parameters - **accountId** (string) - Required - Account identifier. Obtained from List Accounts. - **symbol** (string) - Required - Instrument symbol in the form BASE-QUOTE (e.g. BTC-BRL). #### Request Body *Example Request Body Structure (specific fields depend on order type): ```json { "client_order_id": "optional_client_id", "order_type": "limit", // or "market", "stoplimit", "post-only" "side": "buy", // or "sell" "symbol": "BTC-BRL", "quantity": "0.01", "price": "50000.00", // required for limit and stoplimit orders "stop_price": "52000.00", // required for stoplimit orders "time_in_force": "gtc" // or "fok", "ioc" } ``` ### Response #### Success Response (201 Created) *The response typically includes the details of the placed order, such as its ID, status, and execution information if immediately filled.* #### Response Example ```json { "id": "01HCDAA7YJ68ZJ0FTEPR7DYDS1", "status": "created", "symbol": "BTC-BRL", "side": "buy", "quantity": "0.01", "price": "50000.00", "order_type": "limit", "created_at": 1636047578, "filled_quantity": "0.00", "avg_price": "0.00", "fee": "0.00" } ``` ### Rate Limit 3 requests/sec ### Authorizations Bearer ``` -------------------------------- ### Authorize User Response Sample: Application/JSON Source: https://api.mercadobitcoin.net/api/v4/docs/index This snippet demonstrates the JSON response received after successful user authorization. It contains the access token, which is used for subsequent API requests, and the token's expiration time. ```json { "access_token": "01GF442ATTVP4M6M0XGHQYT544", "expiration": 1666116857 } ``` -------------------------------- ### Get Fees From Asset Source: https://api.mercadobitcoin.net/api/v4/docs/index Retrieves the withdrawal fee (network fee) for a specified asset. You can optionally specify the network if the asset supports multiple. ```APIDOC ## GET /websites/api_mercadobitcoin_net_api_v4/{asset}/fees ### Description Retrieves the withdrawal fee (network fee) for a specified asset. You can optionally specify the network if the asset supports multiple. ### Method GET ### Endpoint https://api.mercadobitcoin.net/api/v4/{asset}/fees ### Parameters #### Path Parameters - **asset** (string) - Required - Instrument asset in the form BASE (e.g. USDC) #### Query Parameters - **network** (string) - Optional - Asset network. If not informed, uses the default network of the asset. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **asset** (string) - Selected instrument asset (equal to the requested one) - **network** (string) - Network of withdrawal - **deposit_minimum** (string) - Minimum asset quantity for deposit - **deposit_confirmations_required** (string) - Network confirmations required for deposit confirmation - **withdraw_minimum** (string) - Minimum asset quantity for withdrawal - **withdrawal_fee** (string) - Fee value to cover the transaction costs (matching value with the field "tx_fee" of the POST/withdrawCoin endpoint) #### Response Example ```json { "asset": "USDC", "network": "stellar", "deposit_minimum": "0.004", "deposit_confirmations_required": "3", "withdraw_minimum": "0.001", "withdrawal_fee": "0.01" } ``` ``` -------------------------------- ### Cancel Order Response Sample Source: https://api.mercadobitcoin.net/api/v4/docs/index Illustrates a typical response when attempting to cancel an order. The response indicates the status of the cancellation request. If 'async' was set to 'true' during the cancellation request, the order may or may not be canceled immediately. ```json { "status": "queued_to_cancel" } ```