117 lines
3.4 KiB
Markdown
117 lines
3.4 KiB
Markdown
**투자자산진단**
|
|
|
|
진입시 케이스가 2개로 나누어짐
|
|
|
|
## 1. 고객ID로 보유종목 조회하는 경우
|
|
>
|
|
> 위의 경우는 하나증권의 하나플러스에서 4408 업무코드로 고객의 데이터를 가지고 진입했을때 사용한다. 이의 API는 <br>[GET] `/counsel/asset/hold`를 사용하고 있다.
|
|
|
|
```javascript
|
|
|
|
//해당 api의 파라미터
|
|
export interface IAssetListInputParam {
|
|
customerId?: string;
|
|
}
|
|
|
|
//해당 api의 결과
|
|
export interface IGetAssetList {
|
|
customerName: string;
|
|
stockList: IStockList[];
|
|
}
|
|
```
|
|
|
|
## 2. ODS 접근 방식으로 보유종목 조회
|
|
>
|
|
> 위의 방법은 하나증권 태블릿 업무 단말인 ODS로 진입했을때 사용하는 경우이다.
|
|
이 방법은 내부에서 /demo 페이지에서 종목코드, 비중을 입력하고 진입하는 경우와 같다.
|
|
API는 <br> [GET] `/counsel/asset/hold/url`를 사용하고 있다.
|
|
|
|
```markdown
|
|
https://1qdevpb.quantec.co.kr/odsrelay?data={"accesstoken":"123qweeyyyyddsd","corp_uid":"987654321","sccofnstcd":"270","access":"hanaplus","branchno":"0094","gbn":"ra","accountinfo":{"foto":["AAPL","TXN","A396300","A353200","A009410","A040160","A298020"],"rate":["20","15","10","20","10","15","10"]}}
|
|
```
|
|
|
|
url 파라미터에 담아 화면에 진입할때 foto를 해당 api itemCd만을 사용함
|
|
|
|
```javascript
|
|
//해당 api의 파라미터
|
|
export interface IAssetListOdsParam {
|
|
itemCd: string;
|
|
}
|
|
|
|
|
|
// 해당 api의 결과
|
|
export interface IGetAssetOdsList {
|
|
customerName: string;
|
|
stockList: IStockOdsList[];
|
|
}
|
|
```
|
|
|
|
```json
|
|
|
|
{
|
|
"itemCd": "AAPL,TXN,A396300,A353200,A009410,A040160,A298020"
|
|
}
|
|
|
|
{
|
|
"customerName": null,
|
|
"stockList": [
|
|
{
|
|
"shortStockCode": "AAPL",
|
|
"stockName": "애플",
|
|
"evaluationAmount": null,
|
|
"holdingWeight": null,
|
|
"isinCode": "US0378331005",
|
|
"inputStockCode": "AAPL"
|
|
},
|
|
{
|
|
"shortStockCode": "TXN",
|
|
"stockName": "텍사스인스트루먼트",
|
|
"evaluationAmount": null,
|
|
"holdingWeight": null,
|
|
"isinCode": "US8825081040",
|
|
"inputStockCode": "TXN"
|
|
},
|
|
{
|
|
"shortStockCode": "396300",
|
|
"stockName": "세아메카닉스",
|
|
"evaluationAmount": null,
|
|
"holdingWeight": null,
|
|
"isinCode": "KR7396300006",
|
|
"inputStockCode": "A396300"
|
|
},
|
|
{
|
|
"shortStockCode": "353200",
|
|
"stockName": "대덕전자",
|
|
"evaluationAmount": null,
|
|
"holdingWeight": null,
|
|
"isinCode": "KR7353200009",
|
|
"inputStockCode": "A353200"
|
|
},
|
|
{
|
|
"shortStockCode": "009410",
|
|
"stockName": "태영건설",
|
|
"evaluationAmount": null,
|
|
"holdingWeight": null,
|
|
"isinCode": "KR7009410002",
|
|
"inputStockCode": "A009410"
|
|
},
|
|
{
|
|
"shortStockCode": "040160",
|
|
"stockName": "누리플렉스",
|
|
"evaluationAmount": null,
|
|
"holdingWeight": null,
|
|
"isinCode": "KR7040160004",
|
|
"inputStockCode": "A040160"
|
|
},
|
|
{
|
|
"shortStockCode": "298020",
|
|
"stockName": "효성티앤씨",
|
|
"evaluationAmount": null,
|
|
"holdingWeight": null,
|
|
"isinCode": "KR7298020009",
|
|
"inputStockCode": "A298020"
|
|
}
|
|
]
|
|
}
|
|
```
|