func (p *IsolatedMarginClient) TransferOut(request margin.IsolatedMarginTransferRequest) (int, error) {
	postBody, jsonErr := model.ToJson(request)
	if jsonErr != nil {
		return 0, jsonErr
	}
	url := p.privateUrlBuilder.Build("POST", "/v1/dw/transfer-out/margin", nil)
	postResp, postErr := internal.HttpPost(url, postBody)
	if postErr != nil {
		return 0, postErr
	}
	result := margin.TransferResponse{}
	jsonErr = json.Unmarshal([]byte(postResp), &result)
	if jsonErr != nil {
		return 0, jsonErr
	}
	if result.Status != "ok" {
		return 0, errors.New(postResp)
	}
	return result.Data, nil
}
Transfer specific asset from isolated margin account to spot trading account
package client
import (
	"encoding/json"
	"errors"
	"github.com/huobirdcenter/huobi_golang/internal"
	"github.com/huobirdcenter/huobi_golang/internal/requestbuilder"
	"github.com/huobirdcenter/huobi_golang/pkg/model"
	"github.com/huobirdcenter/huobi_golang/pkg/model/margin"
	"strconv"
)
type IsolatedMarginClient struct {
	privateUrlBuilder *requestbuilder.PrivateUrlBuilder
}
func (p *IsolatedMarginClient) Init(accessKey string, secretKey string, host string) *IsolatedMarginClient {
	p.privateUrlBuilder = new(requestbuilder.PrivateUrlBuilder).Init(accessKey, secretKey, host)
	return p
}
func (p *IsolatedMarginClient) TransferIn(request margin.IsolatedMarginTransferRequest) (int, error) {
	postBody, jsonErr := model.ToJson(request)
	if jsonErr != nil {
		return 0, jsonErr
	}
	url := p.privateUrlBuilder.Build("POST", "/v1/dw/transfer-in/margin", nil)
	postResp, postErr := internal.HttpPost(url, postBody)
	if postErr != nil {
		return 0, postErr
	}
	result := margin.TransferResponse{}
	jsonErr = json.Unmarshal([]byte(postResp), &result)
	if jsonErr != nil {
		return 0, jsonErr
	}
	if result.Status != "ok" {
		return 0, errors.New(postResp)
	}
	return result.Data, nil
}