82 lines
2.8 KiB
Go
82 lines
2.8 KiB
Go
package ccxt
|
|
|
|
// 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
|
|
|
|
type binancecoinm struct {
|
|
binance
|
|
|
|
}
|
|
|
|
func NewBinancecoinmCore() binancecoinm {
|
|
p := binancecoinm{}
|
|
setDefaults(&p)
|
|
return p
|
|
}
|
|
|
|
func (this *binancecoinm) Describe() interface{} {
|
|
return this.DeepExtend(this.binance.Describe(), map[string]interface{} {
|
|
"id": "binancecoinm",
|
|
"name": "Binance COIN-M",
|
|
"urls": map[string]interface{} {
|
|
"logo": "https://github.com/user-attachments/assets/387cfc4e-5f33-48cd-8f5c-cd4854dabf0c",
|
|
"doc": []interface{}{"https://binance-docs.github.io/apidocs/delivery/en/", "https://binance-docs.github.io/apidocs/spot/en", "https://developers.binance.com/en"},
|
|
},
|
|
"has": map[string]interface{} {
|
|
"CORS": nil,
|
|
"spot": false,
|
|
"margin": false,
|
|
"swap": true,
|
|
"future": true,
|
|
"option": nil,
|
|
"createStopMarketOrder": true,
|
|
},
|
|
"options": map[string]interface{} {
|
|
"fetchMarkets": []interface{}{"inverse"},
|
|
"defaultSubType": "inverse",
|
|
"leverageBrackets": nil,
|
|
},
|
|
})
|
|
}
|
|
func (this *binancecoinm) TransferIn(code interface{}, amount interface{}, optionalArgs ...interface{}) <- chan interface{} {
|
|
ch := make(chan interface{})
|
|
go func() interface{} {
|
|
defer close(ch)
|
|
defer ReturnPanicError(ch)
|
|
// transfer from spot wallet to coinm futures wallet
|
|
params := GetArg(optionalArgs, 0, map[string]interface{} {})
|
|
_ = params
|
|
|
|
retRes3915 := (<-this.FuturesTransfer(code, amount, 3, params))
|
|
PanicOnError(retRes3915)
|
|
ch <- retRes3915
|
|
return nil
|
|
|
|
}()
|
|
return ch
|
|
}
|
|
func (this *binancecoinm) TransferOut(code interface{}, amount interface{}, optionalArgs ...interface{}) <- chan interface{} {
|
|
ch := make(chan interface{})
|
|
go func() interface{} {
|
|
defer close(ch)
|
|
defer ReturnPanicError(ch)
|
|
// transfer from coinm futures wallet to spot wallet
|
|
params := GetArg(optionalArgs, 0, map[string]interface{} {})
|
|
_ = params
|
|
|
|
retRes4415 := (<-this.FuturesTransfer(code, amount, 4, params))
|
|
PanicOnError(retRes4415)
|
|
ch <- retRes4415
|
|
return nil
|
|
|
|
}()
|
|
return ch
|
|
}
|
|
|
|
|
|
func (this *binancecoinm) Init(userConfig map[string]interface{}) {
|
|
this.binance.Init(this.DeepExtend(this.Describe(), userConfig))
|
|
this.Itf = this
|
|
this.Exchange.DerivedExchange = this
|
|
}
|