<?php

namespace ccxt\async;

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code

use Exception; // a common import
use ccxt\async\abstract\binancecoinm as binance;
use \React\Async;

class binancecoinm extends binance {

    public function describe(): mixed {
        return $this->deep_extend(parent::describe(), array(
            'id' => 'binancecoinm',
            'name' => 'Binance COIN-M',
            'urls' => array(
                'logo' => 'https://github.com/user-attachments/assets/387cfc4e-5f33-48cd-8f5c-cd4854dabf0c',
                'doc' => array(
                    'https://binance-docs.github.io/apidocs/delivery/en/',
                    'https://binance-docs.github.io/apidocs/spot/en',
                    'https://developers.binance.com/en',
                ),
            ),
            'has' => array(
                'CORS' => null,
                'spot' => false,
                'margin' => false,
                'swap' => true,
                'future' => true,
                'option' => null,
                'createStopMarketOrder' => true,
            ),
            'options' => array(
                'fetchMarkets' => array(
                    'types' => array(
                        'inverse',
                    ),
                ),
                'defaultSubType' => 'inverse',
                'leverageBrackets' => null,
            ),
        ));
    }

    public function transfer_in(string $code, $amount, $params = array ()) {
        return Async\async(function () use ($code, $amount, $params) {
            // transfer from spot wallet to coinm futures wallet
            return Async\await($this->futuresTransfer ($code, $amount, 3, $params));
        }) ();
    }

    public function transfer_out(string $code, $amount, $params = array ()) {
        return Async\async(function () use ($code, $amount, $params) {
            // transfer from coinm futures wallet to spot wallet
            return Async\await($this->futuresTransfer ($code, $amount, 4, $params));
        }) ();
    }
}
