91 lines
3.1 KiB
Go
91 lines
3.1 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 binanceusdm struct {
|
||
|
binance
|
||
|
|
||
|
}
|
||
|
|
||
|
func NewBinanceusdmCore() binanceusdm {
|
||
|
p := binanceusdm{}
|
||
|
setDefaults(&p)
|
||
|
return p
|
||
|
}
|
||
|
|
||
|
func (this *binanceusdm) Describe() interface{} {
|
||
|
return this.DeepExtend(this.binance.Describe(), map[string]interface{} {
|
||
|
"id": "binanceusdm",
|
||
|
"name": "Binance USDⓈ-M",
|
||
|
"urls": map[string]interface{} {
|
||
|
"logo": "https://github.com/user-attachments/assets/871cbea7-eebb-4b28-b260-c1c91df0487a",
|
||
|
"doc": []interface{}{"https://binance-docs.github.io/apidocs/futures/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{}{"linear"},
|
||
|
"defaultSubType": "linear",
|
||
|
"leverageBrackets": nil,
|
||
|
"marginTypes": map[string]interface{} {},
|
||
|
"marginModes": map[string]interface{} {},
|
||
|
},
|
||
|
"exceptions": map[string]interface{} {
|
||
|
"exact": map[string]interface{} {
|
||
|
"-5021": InvalidOrder,
|
||
|
"-5022": InvalidOrder,
|
||
|
"-5028": InvalidOrder,
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
}
|
||
|
func (this *binanceusdm) 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 usdm futures wallet
|
||
|
params := GetArg(optionalArgs, 0, map[string]interface{} {})
|
||
|
_ = params
|
||
|
|
||
|
retRes5315 := (<-this.FuturesTransfer(code, amount, 1, params))
|
||
|
PanicOnError(retRes5315)
|
||
|
ch <- retRes5315
|
||
|
return nil
|
||
|
|
||
|
}()
|
||
|
return ch
|
||
|
}
|
||
|
func (this *binanceusdm) TransferOut(code interface{}, amount interface{}, optionalArgs ...interface{}) <- chan interface{} {
|
||
|
ch := make(chan interface{})
|
||
|
go func() interface{} {
|
||
|
defer close(ch)
|
||
|
defer ReturnPanicError(ch)
|
||
|
// transfer from usdm futures wallet to spot wallet
|
||
|
params := GetArg(optionalArgs, 0, map[string]interface{} {})
|
||
|
_ = params
|
||
|
|
||
|
retRes5815 := (<-this.FuturesTransfer(code, amount, 2, params))
|
||
|
PanicOnError(retRes5815)
|
||
|
ch <- retRes5815
|
||
|
return nil
|
||
|
|
||
|
}()
|
||
|
return ch
|
||
|
}
|
||
|
|
||
|
|
||
|
func (this *binanceusdm) Init(userConfig map[string]interface{}) {
|
||
|
this.binance.Init(this.DeepExtend(this.Describe(), userConfig))
|
||
|
this.Itf = this
|
||
|
this.Exchange.DerivedExchange = this
|
||
|
}
|