Код бумаги в запросе НРД — код НРД из DEPO по ISIN (у акций ≠ ISIN: SBER/03), иначе M2M43

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
zuevav
2026-09-29 15:09:14 +03:00
parent 2c2ab4e915
commit 7cd3583844
4 changed files with 177 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
//go:build live
package lkgateway
import (
"fmt"
"testing"
)
// Только чтение: код НРД бумаг из DEPO.
func TestNSDCodeLive(t *testing.T) {
rc, err := NewRuntimeConfig("/var/lib/bj/.bj/setup.json")
if err != nil {
t.Fatal(err)
}
fs := rc.Snapshot().Fancy
db, err := fancyOpen(fs, fs.DepoDB())
if err != nil {
t.Fatal(err)
}
defer db.Close()
for _, i := range []string{"RU0009029540", "RU000A0JUR61", "RU000A102QL3", "RU000A1038V6", "RU000A107UL4"} {
fmt.Println(i, "→", depoNSDCode(db, i))
}
}